广

MYSQL

  • MYSQL
  • MSSQL
  • Redis
  • MongoDB
  • oracle数据库
  • 数据管理

    安装MySQL错误归档处理

    2018-04-09 07:41:31 次阅读 稿源:互联网
    零七网广告
    全网推广平台,软文发布

      今天我升级MYSQL到5.1的时候遇到的。写出来共享以下。

      1、

      [root@localhost mysql]# scripts/mysql_install_db

      Neither host 'localhost.localdomain' nor 'localhost' could be looked up with

      /resolveip

      Please configure the 'hostname' command to return a correct

      hostname.

      If you want to solve this at a later stage, restart this script

      with the --force option

      这个主要是修改/etc/hosts文件

    echo "127.0.0.1 localhost.localdomain localhost" >> /etc/hosts

      然后再初始化数据,如果还是同样的错误,那就直接加--force开关。

      我今天碰到的就是这个情况。

      [root@localhost mysql]# scripts/mysql_install_db --force

      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:

      /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.pl

    零七网部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与零七网进行文章共享合作。

    零七网广告
    零七网广告
    零七网广告
    零七网广告