CopyRight owned by the original author.--(www.MegaEntry.com)
创建mysql用户组和用户[root@centos ]# groupadd mysql[root@centos ]# useradd -g mysql mysql[root@centos ]# cd /home/xule/[root@centos ]# chmod 755 mysql-5.0.22.tar.gz编译并安装MySQLMegaEntry - Social networking and discussion site!
[root@centos ]# tar zxvf mysql-5.0.22.tar.gz[root@centos ]#cd mysql-5.0.22[root@centos mysql-5.0.22] ./configure --prefix=/usr/local/mysql[root@centos mysql-5.0.22] make[root@centos mysql-5.0.22] make install配置并启动MySQLMegaEntry - Social networking and discussion site!
[root@centos mysql-5.0.22]# cp support-files/my-medium.cnf /etc/my.cnf[root@centos mysql-5.0.22]# cd /usr/local/mysql [root@centos mysql]# bin/mysql_install_db --user=mysqlInstalling all prepared tablesFill help tablesTo startCopyRight owned by the original author.--(www.MegaEntry.com)
mysqld at boot time you have to copysupport-files/mysql.serverto the right place for your systemPLEASEREMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the followingCopyRight owned by the original author.--(www.MegaEntry.com)
commands:/usr/local/mysql/bin/mysqladmin -u root password 'new-password'/usr/local/mysql/bin/mysqladmin -u root -h centos.job100.com password 'new-password'See the manual for more instructions.You canstart the MySQL daemon with:CopyRight owned by the original author.--(www.MegaEntry.com)
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe&You can testthe MySQL daemon with the benchmarks in the 'sql-bench'directory:cd sql-bench ; perl run-all-testsPlease report any problems with the /usr/local/mysql/bin/mysqlbug script!CopyRight owned by the original author.--(www.MegaEntry.com)
The latestinformation about MySQL is available on the web at http://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.comCopyRight owned by the original author.--(www.MegaEntry.com)
[root@centos mysql]# bin/mysqld_safe --user=mysql &[1] 20100[root@centos mysql]# Starting mysqld daemon with databases from /usr/local/mysql/var添加管理性用户 要管理MySQL 需要创建一个管理性账户[root@centos mysql]# bin/mysqladmin -u root password job100CopyRight owned by the original author.--(www.MegaEntry.com)
红色标注密码让MySQL自动启动进入安装目录[root@centos mysql]# cd /home/xule/mysql-5.0.22[root@centos mysql-5.0.22]# cp support-files/mysql.server /etc/rc.d/init.d/mysql[root@centos mysql-5.0.22]# chmod x /etc/rc.d/init.d/mysqlCopyRight owned by the original author.--(www.MegaEntry.com)
[root@centos mysql-5.0.22]# chkconfig --level 3 --addmysql查看MYSQL运行状态[root@centos bin]# /usr/local/mysql/bin/mysqladmin -u root -p version procEnter password:/usr/local/mysql/bin/mysqladmin Ver 8.41 DistribMegaEntry - Social networking and discussion site!
5.0.22, for pc-linux-gnu on i686Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCXDataKonsult ABThis software comes with ABSOLUTELY NO WARRANTY. This is freesoftware,and you are welcome to modify and redistribute it under the GPLMegaEntry - Social networking and discussion site!
licenseServerversion 5.0.22-logProtocolversionMegaEntry - Social networking and discussion site!
10Connection Localhost via UNIX socketUNIXsocket /tmp/mysql.sockMegaEntry - Social networking and discussion site!
Uptime: 33 min 3 secThreads:1 Questions: 5 Slow queries:0 Opens: 0 Flush tables:1 Open tables: 6 Queries perCopyRight owned by the original author.--(www.MegaEntry.com)
second avg: 0.003 ---- ------ ----------- ---- --------- ------ ------- ------------------ | Id | User |Host | db | Command | Time | State |InfoMegaEntry - Social networking and discussion site!
| ---- ------ ----------- ---- --------- ------ ------- ------------------ | 2 | root | localhost| |Query |0MegaEntry - Social networking and discussion site!
| | show processlist | ---- ------ ----------- ---- --------- ------ ------- ------------------