1) download the Linux-Generic package of Mysql5.5: http://download.softagency.net/mysql/downloads/mysql-5.5/ I download the license mysql-5.5.17-linux2.6-x86_64.tar.gz.
2) Confirm that the installed mysql has been thoroughly uninstalled. For details, refer to the full process record of installing Mysql 11.04 through apt in Ubuntu 5.1 (see) for more information about how to uninstall Mysql5.1, check that the following directories and files have been deleted $ sudo rm-R/etc/mysql $ sudo rm/etc/my. cnf $ sudo rm/etc/init. d/mysql
3) install $ su -- Switch to the root account # apt-get install libaio-dev # groupadd mysql -- Add a mysql user group # useradd-r-g mysql -- Add mysql user # cd/usr/local # tar zxvf/path/to/mysql-VERSION-OS.tar.gz -- Decompress the binary installation package # ln-s full-path-to-mysql-VERSION-OS mysql -- Create a soft link # cd mysql # chown-R mysql. -- Modify the owner of the Directory # chgrp-R mysql. -- Modify the user group to which the directory belongs # scripts/mysql_install_db -- user = mysql -- Execute database installation commands
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h bcserver4utest password 'new-password'
Alternatively you can run:
./bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
# Chown-R root. # chown-R mysql data # cp support-files/my-medium.cnf/etc/my. cnf -- [Optional] copy the configuration file
4) Start the database with a mysql user in the background # bin/mysqld_safe -- user = mysql &
Default: the data file is in the data directory.
5) create a self-starting script # cp support-files/mysql. server/etc/init. d/mysql and then start the input directly #/etc/init. d/mysql restart | start
Enter the database management command $ bin/mysql-u-root-p