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 ".