« | »

Setting up MySQL in Fedora Core 6

By Studge | March 11, 2007

I decided to develop a web portal that runs off of my laptop for my personal use. Since it is the only computer I use for business, it seemed like the logical direction to take. One problem that I have always had when developing a server setup is getting MySQL to do what it is supposed to do. Here is my personal documentation so hopefully I will not have to suffer with it again. This post is about Fedora Core, so I will include the yum statements I used. For other distros, just install the equivalent packages.

[root@localhost ~]# yum install mysql mysql-devel mysql-server

Now, I am going to start the MySQL server and set it up to start everytime I boot.

[root@localhost ~]# service mysqld start
Starting MySQL:     [ OK ]
[root@localhost ~]# chkconfig mysqld on

Now I need to set the password for the root user:

[root@localhost ~]# mysqladmin -u root password yourpassword

Since I am going to install Drupal as a CMS for my personal portal, I am going to need a database for the installation. I will create a database named ‘drupal’ and then create a user account for this database called ‘duser’. It is not recommended that you use the root account for accessing your MySQL databases.

[root@localhost ~]# mysql -u root -p
Enter password:
mysql>; CREATE DATABASE drupal;
Query OK, 1 row affected (0.09 sec)
mysql> GRANT ALL PRIVILEGES ON drupal.*
  -> TO 'duser'@'localhost' IDENTIFIED BY
  ->'yourpassword' WITH GRANT OPTION;
Query OK, 0 rows affected (0.01 sec)
mysql> quit
Bye

That’s all there is to it. After that, I put the access information that I just created into Drupal’s database configuration page and it installed the CMS for me.

Topics: Linux, MySQL

Share: del.icio.us | digg | reddit

RSS feed | Trackback URI

1 Comment »

Comment by aco
2008-12-20 22:19:53

Thanks for you info……………..:)

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.