Saturday, February 6, 2010

Setup MySQL on OpenSUSE 11.1

This is the guide to setup mysql on OpenSUSE 11.1, the steps will be slightly different if you are using other Linux distros, It also assuming you are using KDE 
  1. Application Launcher → Applications → System → Configuration → Install Software
  2. search “mysql”
  3. click on “mysql” and “mysql-gui-tools”, click Accept to install
  4. Open “Terminal”
  5. su -
  6. cp /usr/share/mysql/mysql.servera mysql
  7. chkconfig --add mysql
  8. You should see this:
    mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
  9. if not, the run the command below to make mysql run on runlevel 2,4,5:
    chkconfig --level 245 mysql on
  10. chown mysql:mysql mysql
  11. ls -al mysql
  12. You should see the below:
    -rwxr-xr-x 1 mysql mysql 11960 Aug 18 17:42 mysql
  13. cd /etc/
  14. cp my.cnf my.cnf.bak
  15. vim my.cnf
  16. Add in new lines under the
    [mysqld]:
    datadir=/home/mysql
    user=mysql
  17. cd /home/
  18. mkdir mysql
  19. chown mysql:mysql mysql
  20. mysql_install_db --datadir=/home/mysql/ --user=mysql
  21. cd /home/mysql/
  22. chown mysql:mysql -R *
  23. mysqladmin -u root password 'password'
  24. Now, you should able to log on via MySql Database Administrator gui to create new users & database.
  25. In the, Database Administrator gui, creatre schema; then create user and password “ermpassword”. Assigned all privileges in new schema to the user created
  26. Now you are goto go

No comments:

Post a Comment