您的位置:首页 > 数据库 > MySQL

安装mysql

2016-05-13 15:04 591 查看
==>>

mysql root 密码是123 , 后续你需要导入数据库。现在已经进入mysql 环境状态了. exit 可直接退出 ,如下。

mysql> exit

Bye

hiterminal@test:/etc/mysql$ mysql -uroot -p

Enter password:

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

Your MySQL connection id is 95

Server version: 5.5.35-1ubuntu1 (Ubuntu)

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>

====》至于为什么出现这个 '/var/run/mysql/mysqld.sock',原因未知。

问题解决方法,

1. 先解决 你如下出现的安装包依赖项的问题

sudo apt-get autoclean

sudo apt-get update

sudo dpkg --configure -a

sudo apt-get -f install

sudo apt-get install libc6-dev-i386

2. 干净删除 现有的 mysql

sudo apt-get autoremove mysql-server

sudo apt-get remove mysql-common

dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

3. 再重新安装

sudo apt-get install mysql-server

sudo apt-get install mysql-client

4. 重启 mysql 服务程序

sudo /etc/init.d/mysql restart

5. 现在可正常使用

mysql -uroot -p
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: