mysql5.6.28安装配置方法

1.系统基本信息查看,尝试yum安装

$ sudo -s
# df -lh
Filesystem  Size Used Avail Use% Mounted on
/dev/vda1  79G 1.6G 74G 3% /
udev   3.9G 8.0K 3.9G 1% /dev
tmpfs   799M 252K 799M 1% /run
none   5.0M  0 5.0M 0% /run/lock
none   3.9G  0 3.9G 0% /run/shm
# uname -a
Linux nj01 3.16.0-34-generic #47~14.04.1-Ubuntu SMP Fri Apr 10 17:49:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

# rpm -qa|grep yum
The program 'rpm' is currently not installed. You can install it by typing:
apt-get install rpm
# apt-get install rpm
……
# rpm -qa|grep yum
# yum install 
The program 'yum' is currently not installed. You can install it by typing:
apt-get install yum
# apt-get install yum
……
# yum install mysql
Setting up Install Process
No package mysql available.
Nothing to do

2.更换安装方式

# apt-get install mysql-server
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libnet-daemon-perl libplrpc-perl libterm-readkey-perl mysql-client-5.5
  mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libnet-daemon-perl libplrpc-perl libterm-readkey-perl mysql-client-5.5
  mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 13 newly installed, 0 to remove and 15 not upgraded.
Need to get 27.6 MB of archives.
After this operation, 98.2 MB of additional disk space will be used.
Do you want to continue [Y/n]"htmlcode">

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' identified by '******';
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> 
mysql> 
mysql> 
mysql> 
mysql> create database testdb;
Query OK, 1 row affected (0.01 sec)

mysql> 
mysql> 
mysql> 
mysql> 
mysql> show databases;
+--------------------+
| Database   |
+--------------------+
| information_schema |
| mysql    |
| testdb    |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)

mysql> insert into mysql.user(Host,User,Password) values("%","test",password("******"));
Query OK, 1 row affected, 3 warnings (0.00 sec)

mysql> 
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON testdb.* TO 'test'@'% identified by '******';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

4.问题解决

(1)访问报错,网络连接报错:10038 ,telnet 不通
S1.关闭防火墙 # ufw allow 3306 ,还是不行
S2.用户网络权限已经给了(rant all privileges on . to ‘root'@'%' identified by ‘youpassword' with grant option;)
S3.查看网路信息 # netstat -ano
tcp 0 0 127.0.0.1:3306
应该是绑定IP问题,修改/etc/MySQL/my.conf
找到bind-address = 127.0.0.1这一行
改为bind-address = 0.0.0.0,问题解决。
(2)表区分大小写:
用root帐号登录后,在/etc/my.cnf 中的[mysqld]后添加添加lower_case_table_names=1,重启MYSQL服务,这时已设置成功:不区分表名的大小写;
lower_case_table_names参数详解:
lower_case_table_names = 0
其中 0:区分大小写,1:不区分大小写

5.基本服务命令

# 启动MySQL$ sudo service mysql start 
# 关闭MySQL$ sudo service mysql stop
# 重启MySQL$ sudo service mysql restart
# 其他命令:$ sudo /etc/init.d/mysql start
$ sudo /etc/init.d/mysql stop
$ sudo /etc/init.d/mysql restart

6.卸载Mysql:

sudo apt-get autoremove mysql* --purge
sudo apt-get remove apparmor
sudo apt-get install mysql-server mysql-common

卸载后删除mysql相关文件(/var/lib/mysql , /etc/mysql等等,可以用 find -name mysql 查询下相关路径)

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

标签:
Linux,Ubuntu,mysql5.6.28,mysql5.6

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com

《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线

暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。

艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。

《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。