Rate This Document
Findability
Accuracy
Completeness
Readability

Starting, Logging In to, and Stopping MySQL

  • Start MySQL.
  1. Start the MySQL server.
    1
    /usr/local/mysql/bin/mysqld --defaults-file=/usr/local/mysql/my.cnf
    

  2. Check whether the service is started.
    ps -ef | grep mysql

    The service is started if the following information is displayed:

  • Access MySQL.
    1
    /usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysql.sock
    

  • Stop MySQL.
    1
    /usr/local/mysql/bin/mysqladmin shutdown -uroot -p123456 -S /data/mysql/run/mysql.sock