首页 / 数据库 / MySQL / 安装MySQL错误归档处理
安装MySQL错误归档处理2010-09-06今天我升级MYSQL到5.1的时候遇到的。写出来共享以下。1、[root@localhost mysql]# scripts/mysql_install_dbNeither host "localhost.localdomain" nor "localhost" could be looked up with/resolveipPlease configure the "hostname" command to return a correcthostname.If you want to solve this at a later stage, restart this scriptwith the --force option这个主要是修改/etc/hosts文件echo "127.0.0.1 localhost.localdomain localhost" >> /etc/hosts
然后再初始化数据,如果还是同样的错误,那就直接加--force开关。我今天碰到的就是这个情况。[root@localhost mysql]# scripts/mysql_install_db --forceInstalling MySQL system tables...OKFilling help tables...OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/local/mysql//bin/mysqladmin -u root password "new-password"/usr/local/mysql//bin/mysqladmin -u root -h localhost.localdomain password "new-password"See the manual for more instructions.You can start the MySQL daemon with:cd . ; /usr/local/mysql//bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd mysql-test ; perl mysql-test-run.plPlease report any problems with the ./bin/mysqlbug script!The latest information about MySQL is available on the web athttp://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.com这样就成功初始化数据了。