mysql清除旧版本_mysql没有删除旧版本就直接安装的后果。

我并没发现我的台式机(ubuntu 13.04)居然默认安装了mysql,我直接在mysql观望上下载的编译好的包,解压,mv 到/usr/local/mysql.然后很流利的根据以往的经验来配置。结果,居然没有起来。

于是,我看了下环境变量,我没有把mysql/bin 加入到环境变量,于是我手动一敲:mysql  报了进程locked什么错误。完了,我输入sudo dpkg -l |grep mysql  哗哗的列出一大堆。

我看都懒得看,直接卸载:sudo  apt-get autoremove mysql*  管它什么东西,全删了。

查看/usr/bin下面N 多关于mysql的配置文件,不管,rm -f mysql*

在/根目录下看看还有没有与mysql 有关的东西,全删。

删的差不多了,我就执行复制到/etc/init.d/mysql.server(根据mysql安装包里的安装说明操作叫INSTALL-****)。

Starting MySQL

. * The server quit without updating PID file (/usr/local/mysql/data/libin-H61-S3.pid).

我进入到/usr/local/mysql/data/   查看libin-H61-S3.erro  显示找不到libaio.so.1.

没有我就装上吧。

sudo  apt-get install libaio-dev

装好之后再启动,还是提示 Starting MySQL

. * The server quit without updating PID file (/usr/local/mysql/data/libin-H61-S3.pid).

再看错误日志:2013-06-24 15:54:46 15952 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

130624 15:54:46 mysqld_safe mysqld from pid file /usr/local/mysql/data/libin-H61-S3.pid ended

这里我曾经删除过mysql用户,所有初始化一下就ok.

到mysql目录下, scripts/mysql_install_db --user=mysql

看到成功的提示后,就木问题了。

加入环境变量后,输入mysql

root@libin-H61-S3:/usr/local/mysql/data# mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.6.12 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

好熟悉的界面啊,哈哈哈哈。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值