安装mysql

来源:互联网 发布:什么是淘宝黑搜 编辑:程序博客网 时间:2024/04/30 11:19
==>>
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
0 0
原创粉丝点击