Advertisement
muddyme

MySQL Commands to Create Database

May 15th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.62 KB | None | 0 0
  1. These notes are in relation to this WordPress Support thread
  2. http://wordpress.org/support/topic/wordpress-installation-problems?replies=8
  3.  
  4. To create a MySql database, login to the MySQL Administrator, and locate the Command Line Client under the Tools menu.
  5. You will get a window that looks similar to the DOS command prompt.
  6. When you see the mysql> prompt enter the following commands including the semi-colon (;) at the end of the command
  7.  
  8. CREATE DATABASE something_wrdp;
  9.  
  10. In the above CREATE command, you should replace something_wrdp with whatever database name you want to use.
  11. mysql will respond with something like this>  Query OK, 1 row affected (0.00 sec)
  12.  
  13. Next command to enter at the mysql> prompt is:
  14.  
  15. GRANT ALL PRIVILEGES ON something_wrdp.* TO "username"@"localhost" IDENTIFIED BY "password";
  16.  
  17. In the above GRANT command, you would replace something_wrdp with whatever database name you used in the CREATE command. Also replace username with whatever name you want to use and do the same with password.  Use a very good 12 to 15 character cryptic password using a combination of letters (upper and lower case) and numbers.
  18.  
  19. mysql will respond with something like this> Query OK, 0 rows affected (0.00 sec)
  20.  
  21. Next command to enter at the mysql> prompt is:
  22.  
  23. FLUSH PRIVILEGES;
  24.  
  25. mysql will respond with something like this> Query OK, 0 rows affected (0.01 sec)
  26.  
  27. Finally, at the mysql> prompt just enter EXIT and you will see the message Bye
  28.  
  29. That is it. Your mySQL database should be created and the database name, user name and password that you used here will go in your wp-config.php file when setting up WordPress.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement