mysql from pid file_mysqld_safe mysqld from pid file /data/mysql/sphin

这篇博客记录了在安装MySQL过程中遇到的错误,包括'skip-federated'选项不识别和启动mysqld时的安全问题。通过编辑配置文件解决skip-federated问题后,系统表安装成功,但启动时仍提示需要以root权限运行。最终通过指定参数跳过权限检查启动了mysqld,但提示必须为MySQL root用户设置密码。
摘要由CSDN通过智能技术生成

# /usr/local/mysql/bin/mysqld_safe --user=_mysql

090607 07:40:13 mysqld_safe Logging to '/data/mysql/sphinx.atyu30.org.err'.

090607 07:40:13 mysqld_safe Starting mysqld daemon with databases from /data/mysql

090607 07:40:14 mysqld_safe mysqld from pid file /data/mysql/sphinx.atu30.org.pid ended

# /usr/local/mysql/bin/mysql_install_db --user=_mysql

Installing MySQL system tables...

090607  7:42:40 [Warning] Storage engine 'SPHINX' has conflicting typecode. Assigning value 42.

090607  7:42:40 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-federated'

090607  7:42:40 [ERROR] Aborting

090607  7:42:40 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

Installation of system tables failed!  Examine the logs in

/data/mysql for more information.

You can try to start the mysqld daemon with:

shell> /usr/local/mysql/libexec/mysqld --skip-grant &

and use the command line tool /usr/local/mysql/bin/mysql

to connect to the mysql database and look at the grant tables:

shell> /usr/local/mysql/bin/mysql -u root mysql

mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log

gives you a log in /data/mysql that may be helpful.

The latest information about MySQL is available on the web at

http://www.mysql.com/.  Please consult the MySQL manual section

'Problems running mysql_install_db', and the manual section that

describes problems on your OS.  Another information source are the

MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if

you do mail us, you MUST use the /usr/local/mysql/bin/mysqlbug script!

# /usr/local/mysql/libexec/mysqld --skip-grant &

[1] 25231

# 090607  7:43:02 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

090607  7:43:02 [ERROR] Aborting

090607  7:43:02 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

[1] + Done (1)             /usr/local/mysql/libexec/mysqld --skip-grant

# /usr/local/mysql/libexec/mysqld --skip-grant &

[1] 4194

# 090607  7:43:26 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

090607  7:43:26 [ERROR] Aborting

090607  7:43:26 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

==========================================================================

编辑/etc/my.cnf

把 skip-federated  注释 掉

然后重新  初始化 数据库  mysql_install_db  --user=mysql

# /usr/local/mysql/bin/mysql_install_db --user=_mysql

Installing MySQL system tables...

090607  7:50:34 [Warning] Storage engine 'SPHINX' has conflicting typecode. Assigning value 42.

OK

Filling help tables...

090607  7:50:35 [Warning] Storage engine 'SPHINX' has conflicting typecode. Assigning value 42.

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 sphinx.atyu30.org password 'new-password'

Alternatively you can run:

/usr/local/mysql/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 /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/mysql/bin/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/

Support MySQL by buying support/licenses from http://shop.mysql.com/

# /script/mysql.server start

Starting MySQL

. ERROR! Manager of pid-file quit without updating file.

# cd /usr/local/mysql/# /usr/local/mysql/bin/mysqld_safe &

[1] 25844

# 090607 07:52:08 mysqld_safe Logging to '/data/mysql/sphinx.atyu30.org.err'.

090607 07:52:08 mysqld_safe Starting mysqld daemon with databases from /data/mysql

#

# netstat -ant | grep LISTEN

tcp        0      0  *.3306                 *.*                    LISTEN

mysql> show engines;

+------------+---------+-----------------------------------------------------------+--------------+------+------------+

| Engine     | Support | Comment                                                   | Transactions | XA   | Savepoints |

+------------+---------+-----------------------------------------------------------+--------------+------+------------+

| CSV        | YES     | CSV storage engine                                        | NO           | NO   | NO         |

| SPHINX     | YES     | Sphinx storage engine 0.9.9                               | NO           | NO   | NO         |

| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables | NO           | NO   | NO         |

| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance    | NO           | NO   | NO         |

| MRG_MYISAM | YES     | Collection of identical MyISAM tables                     | NO           | NO   | NO         |

+------------+---------+-----------------------------------------------------------+--------------+------+------------+

5 rows in set (0.00 sec)

阅读(7872) | 评论(0) | 转发(0) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值