bad interpreter mysql_-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such fil...

今天安装mysql5.6.12安装有些许报错,我在这里贴出来,给大家分享一下:

安装完成后,初始化数据库报错如下:

[root@localhost mysql]# ./scripts/mysql_install_db  --user=mysql

-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or

directory

貌似提示注释器错误,没有/usr/bin/perl文件或者档案,解决办法(安装perl跟perl-devel即可):

执行  yum -y install perl perl-devel

后在初始化数据库即可。

启动mysql报错如下:

[root@localhost mysql]# /etc/init.d/mysqld start

Starting MySQL.............. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

查看日志文件有以下错误日志:

2013-08-08 13:07:44 21805 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

130808 13:07:45 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended

解决办法:cp ./support-files/my-default.cnf /etc/my.cnf  后再重启即可

根据度娘的结果,有大虾说是机器内存的问题,我在这里贴出其解决方案:

查看日志文件,看看有什么提示!生成my.cnfsudo cp support-files/my-medium.cnf /etc/my.cnf#下面是安装使用过程中出现的一些问题及解决方法一.不能用root用户运程连接mysql*******************************************************************************为MySQL的root用户添加远程访问权限:[root@localhost ~]# mysql -uroot -pEnter password: (此处输入密码登录)Welcome to the MySQL monitor.  Commands end with ; or /g.Your MySQL connection id is 35 to server version: 5.0.22Type 'help;' or '/h' for help. Type '/c' to clear the buffer.mysql> grant all on *.* to root@'%' identified by 'your_password';Query OK, 0 rows affected (0.01 sec)mysql> exitBye[root@localhost ~]# /etc/init.d/mysqld restart*******************************************************************************二.Mysqld启动失败*******************************************************************************1)  mysql相关进程僵死查找mysql相关进程:sudo ps –A | grep mysql杀死相关进程:sudo kill -9 process_id重启mysqld:sudo /etc/init.d/mysqld restart2)优化后出现Starting MySQL..The server quit without updating PID file ([失败]ocal/mysql/data/localhost.localdomain.pid).这个问题主要出现的原因是因为my.cnf的配置过于高,当前的机器无法满足,导致了MYSQL启动失败,估计以后也会有很多人遇到这个问题,网上的标准是:如果内存是128M,则复制/usr/local/share/mysql/my-medium.cnf为/etc/my.cnf# This is for a system with little memory (32M - 64M) where MySQL plays# an important part, or systems up to 128M where MySQL is used together with# other programs (such as a web server)如果内存是512M,则复制/usr/local/share/mysql/my-large.cnf为/etc/my.cnf# This is for a large system with memory = 512M where the system runs mainly# MySQL.如果内存是1-2G,则复制/usr/local/share/mysql/my-huge.cnf为/etc/my.cnf# This is for a large system with memory of 1G-2G where the system runs mainly# MySQL.实际上需要在my-medium.cnf的基础上进行修改,增强部分配置,不能直接使用my-large.cnf和my-huge.cnf。除非你的服务器配置相当高。3)./mysql-bin.index not found权限问题修改数据目录的权限及/usr/local/mysql/bin/mysqld 的权限。4)Error Code : 1418This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)(0 ms taken)解决方法如下:1. mysql> SET GLOBAL log_bin_trust_function_creators = 1;2. 在my.ini(linux下为my.conf)文件中 [mysqld] 标记后加一行内容为 log-bin-trust-function-creators=1http://blog.chinaunix.net/space. ... blog&id=2435868

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值