mysql
Setting up mysql for wordpress.
I have a local area network in my house. There are several computers on this LAN, one of them runs Debian-Etch and serves as a sandbox. A sandbox is a term used for many things. In this case it is a LAN blog based on wordpress.
The machine running this sandbox is also capable of being used as a standalone blog machine. It can be removed from the LAN and the blog can be viewed, maintained, and used through a browser working into the blog machine under Linux.
Here is a sequence of commands required to setup a fresh installation of mysql to work with the wordpress software.
First we make sure that mysql is running. If you don’t get the results below, it may not be running. In that case try:
/sbin/chkconfig mysqld on
or
/sbin/service mysqld start
Now set up the root password for mysql
mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’root_pwd’) WHERE user=’root’;
note: root_pwd should be the password you want to use. Also, don’t forget the ‘ marks and the ; at the end.
mysql> FLUSH PRIVILEGES;
mysql> quit
The password is now set. In the example above it is root_pwd.
Now log back on and create a wordpress database.
mysql -u root -p
password=root_pwd
mysql> create database wordpress;
mysql> show databases;
Make sure that the wordpress database is displayed.
mysql> grant all on wordpress.* to ‘root’@'localhost’ identified by ‘root_pwd’;
If mysql does not accept the commands, it could be you left off the ; at the end of the command. The ; identifies the expression as a command. Also, don’t forget the ‘. The ‘ is the character below the ” and is located on that same key of the keyboard.