MySQL configuration

At the time of installing MySQL server, you were asked to set up administrator (root) credentials. Since these credentials allow full access to the SQL server, including permissions on all databases, you should never use them in any of your PHP applications. The best practice is to create a separate MySQL user and to assign permissions on the database that will be used by your application. Log in to your local MySQL server with the following command:

 # mysql -u root -p 

Create a new SQL database:

mysql> CREATE DATABASE wordpress;

Create a SQL user and grant all permissions to the wordpress database (don't forget to specify a complex enough password):

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'password';

Now, run the exit command to leave the MySQL console and try logging in to the server using the newly created account:

mysql> exit 
# mysql -u wordpress -p 
mysql> SHOW DATABASES; 

You should see the wordpress database you created a minute ago.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.4.176