安装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
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
相关文章推荐
- win7下MySql 5.7安装配置方法图文教程
- mysql数据库中的自增字段会不会溢出,我用的是int,万一超过这个int的表示范围会怎样
- 实例解析MySQL中的存储过程及存储过程的调用方法
- mysql 插入数据失败防止自增长主键增长的方法
- MYSQL必知必会读书笔记 第二十七章 字符集和校对规则
- 关于mysql数据库升级到5.6的问题
- MySQL 保留字
- Can't change to run as user 'mysql' Please check that the user exists
- mysql的表类型MyISAM和InnoDB的区别
- Windows下mysql修改root密码的4种方法
- Elasticsearch mysql 增量同步
- MYSQL必知必会读书笔记 第二十六章 管理事务处理
- MySQL索引注意的几个地方
- 本地msdos(cmd)下输入mysql命令提示:‘mysql’不是内部或外部命令,也不是可运行的程序或批处理文件
- MySQL性能优化二十大实战经验
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 启动不了
- 第二章 mybatis使用注解实现in查询(mysql)
- MYSQL必知必会读书笔记 第二十五章 使用触发器
- Host 'XXX' is not allowed to connect to this MySQL server 解决方案
- mysql报错【1248】处理