MySQL

Creating Database in MySQL

mysql>create database Sample
Query OK, 1 row affected (0.00 sec)

Creating users

mysql> CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'password'
mysql> GRANT ALL PRIVILEGES ON *.* TO 'sqluser'@'localhost' WITH GRANT OPTION;

Here sqluser is a superuser but he can connect only to localhost.

mysql> use Sample
Database changed

mysql> SELECT * FROM person
Lists the contents of the table Person

No comments:

 Python Basics How to check the version of Python interpreter mac terminal

Popular in last 30 days