After MySQL is installed in Ubuntu, MySQLSERVER cannot be started.

Source: Internet
Author: User
Install MySQL database under Ubuntu steps: Installing 3. cdmysql-6.0.4-alpha4 ../configure -- prefix =/usr/local/mysql5.make6. sudomakeinstall7.sudocpsupported-files/m

Steps for installing a MySQL database in Ubuntu:

1.download mysql-6.0.4-alpha.tar.gz
2. tar-zxvf mysql-6.0.4-alpha.tar.gz
3. cd mysql-6.0.4-alpha
4../configure -- prefix =/usr/local/mysql
5. make
6. sudo make install
7. sudo cp supported-files/my-medium.cnf/etc/my. cnf
8. sudo cp supported-files/mysql. server/etc/init. d
9. sudo chmod a + x/etc/ini. d/mysql. server
10. cd/usr/local/mysql
11. bin/mysql_install_db -- user = mysql

At this point, mysql is basically installed, and then mysql will be started.

Try mysqld_safe first:

1. bin/mysqld_safe &

2. ps-ef | grep mysql

Check the mysql process, OK, and kill the mysql process.

Now try to start mysql as a service:

1./etc/init. d/mysql. server

Error: Starting MySQL ../etc/init. d/mysql: line 159: kill: (6638)-No such process

So sudo vi/etc/init. d/mysql. server finds the script for starting mysql, which is about 307 rows. Print the variables.

Run the command bin/mysqld_safe -- datadir =/usr/local/mysql/var/-- pid-file =/usr/local/mysql/var/mysql. pid to start mysql.

The error "permission deny" is reported when mysql is started. Therefore, the/usr/mysql/var/mysql. pid file cannot be created due to user permission issues.

Run the above command again: sudo bin/mysqld_safe -- datadir =/usr/local/mysql/var/-- pid-file =/usr/local/mysql/var/mysql. pid

So far, it is clear! Remember "sudo" When manually executing/etc/init. d/mysql. server ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.