You need root privileges for this.
You should already have a mysql group and user. if not, create them with
groupadd mysql
useradd -g mysql mysql
1. You need to make sure mysql has rights to it's folder. So
chown -R mysql:mysql /var/lib/mysql
2. Install the default database
su mysql
mysql_install_db
exit
3. Create the configuration file from the example one:
cp /etc/my-medium.cnf /etc/my.cnf
4. Restart MySQL:
/etc/rc.d/rc.mysqld stop
/etc/rc.d/rc.mysqld start
5. Create a root password:
/usr/bin/mysqladmin -u root -h localhost password 'yourpasswordhere'
You should already have a mysql group and user. if not, create them with
groupadd mysql
useradd -g mysql mysql
1. You need to make sure mysql has rights to it's folder. So
chown -R mysql:mysql /var/lib/mysql
2. Install the default database
su mysql
mysql_install_db
exit
3. Create the configuration file from the example one:
cp /etc/my-medium.cnf /etc/my.cnf
4. Restart MySQL:
/etc/rc.d/rc.mysqld stop
/etc/rc.d/rc.mysqld start
5. Create a root password:
/usr/bin/mysqladmin -u root -h localhost password 'yourpasswordhere'

No comments:
Post a Comment