Mysql实例Linux(Ubuntu)下Mysql5.6.28安装配置方法图文教程

Mysql实例Linux(Ubuntu)下Mysql5.6.28安装配置方法图文教程,第1张

概述介绍《Mysql实例Linux(Ubuntu)下Mysql5.6.28安装配置方法图文教程》开发教程,希望对您有用。

《MysqL实例linux(Ubuntu)下MysqL5.6.28安装配置方法图文教程》要点:@H_419_3@本文介绍了MysqL实例linux(Ubuntu)下MysqL5.6.28安装配置方法图文教程,希望对您有用。如果有疑问,可以联系我们。

MysqL5.6.28安装配置方法MysqL教程

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

$ sudo -s# df -lhfilesystem  Size Used Avail Use% Mounted on/dev/vda1  79G 1.6G 74G 3% /udev   3.9G 8.0K 3.9G 1% /devtmpfs   799M 252K 799M 1% /runnone   5.0M  0 5.0M 0% /run/locknone   3.9G  0 3.9G 0% /run/shm# uname -alinux 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 yumThe 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 MysqLSetting up Install ProcessNo package MysqL available.nothing to do

2.更换安装方式MysqL教程

# 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]? y
Get:1 http://apt.wmcloud.com/ubuntu/ precise-updates/main MysqL-common all 5.5.52-0ubuntu0.12.04.1 [12.6 kB]
Get:2 http://apt.wmcloud.com/ubuntu/ precise-updates/main libMysqLclIEnt18 amd64 5.5.52-0ubuntu0.12.04.1 [952 kB]
Get:3 http://apt.wmcloud.com/ubuntu/ precise/main libnet-daemon-perl all 0.48-1 [43.1 kB]
Get:4 http://apt.wmcloud.com/ubuntu/ precise/main libplrpc-perl all 0.2020-2 [36.0 kB]
Get:5 http://apt.wmcloud.com/ubuntu/ precise/main libdbi-perl amd64 1.616-1build2 [849 kB]
Get:6 http://apt.wmcloud.com/ubuntu/ precise/main libdbd-mysql-perl amd64 4.020-1build2 [106 kB]
Get:7 http://apt.wmcloud.com/ubuntu/ precise-updates/main MysqL-clIEnt-core-5.5 amd64 5.5.52-0ubuntu0.12.04.1 [1,948 kB]
Get:8 http://apt.wmcloud.com/ubuntu/ precise/main libterm-readkey-perl amd64 2.30-4build3 [28.6 kB]
Get:9 http://apt.wmcloud.com/ubuntu/ precise-updates/main MysqL-clIEnt-5.5 amd64 5.5.52-0ubuntu0.12.04.1 [8,365 kB]
Get:10 http://apt.wmcloud.com/ubuntu/ precise-updates/main MysqL-server-core-5.5 amd64 5.5.52-0ubuntu0.12.04.1 [6,327 kB]
Get:11 http://apt.wmcloud.com/ubuntu/ precise-updates/main MysqL-server-5.5 amd64 5.5.52-0ubuntu0.12.04.1 [8,855 kB]
Get:12 http://apt.wmcloud.com/ubuntu/ precise/main libHTML-template-perl all 2.10-1 [65.0 kB]
Get:13 http://apt.wmcloud.com/ubuntu/ precise-updates/main MysqL-server all 5.5.52-0ubuntu0.12.04.1 [10.8 kB]
Fetched 27.6 MB in 0s (38.2 MB/s)   
Preconfiguring packages ...
Selecting prevIoUsly unselected package MysqL-common.
(Reading database ... 77501 files and directorIEs currently installed.)
Unpacking MysqL-common (from .../MysqL-common_5.5.52-0ubuntu0.12.04.1_all.deb) ...
Selecting prevIoUsly unselected package libMysqLclIEnt18.
Unpacking libMysqLclIEnt18 (from .../libMysqLclIEnt18_5.5.52-0ubuntu0.12.04.1_amd64.deb) ...
Selecting prevIoUsly unselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.48-1_all.deb) ...
Selecting prevIoUsly unselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting prevIoUsly unselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.616-1build2_amd64.deb) ...
Selecting prevIoUsly unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.020-1build2_amd64.deb) ...
Selecting prevIoUsly unselected package MysqL-clIEnt-core-5.5.
Unpacking MysqL-clIEnt-core-5.5 (from .../MysqL-clIEnt-core-5.5_5.5.52-0ubuntu0.12.04.1_amd64.deb) ...
Selecting prevIoUsly unselected package libterm-readkey-perl.
Unpacking libterm-readkey-perl (from .../libterm-readkey-perl_2.30-4build3_amd64.deb) ...
Selecting prevIoUsly unselected package MysqL-clIEnt-5.5.
Unpacking MysqL-clIEnt-5.5 (from .../MysqL-clIEnt-5.5_5.5.52-0ubuntu0.12.04.1_amd64.deb) ...
Selecting prevIoUsly unselected package MysqL-server-core-5.5.
Unpacking MysqL-server-core-5.5 (from .../MysqL-server-core-5.5_5.5.52-0ubuntu0.12.04.1_amd64.deb) ...
Processing triggers for man-db ...
Setting up MysqL-common (5.5.52-0ubuntu0.12.04.1) ...
Selecting prevIoUsly unselected package MysqL-server-5.5.
(Reading database ... 77879 files and directorIEs currently installed.)
Unpacking MysqL-server-5.5 (from .../MysqL-server-5.5_5.5.52-0ubuntu0.12.04.1_amd64.deb) ...
Selecting prevIoUsly unselected package libHTML-template-perl.
Unpacking libHTML-template-perl (from .../libHTML-template-perl_2.10-1_all.deb) ...
Selecting prevIoUsly unselected package MysqL-server.
Unpacking MysqL-server (from .../MysqL-server_5.5.52-0ubuntu0.12.04.1_all.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up libMysqLclIEnt18 (5.5.52-0ubuntu0.12.04.1) ...
Setting up libnet-daemon-perl (0.48-1) ...
Setting up libplrpc-perl (0.2020-2) ...
Setting up libdbi-perl (1.616-1build2) ...
Setting up libdbd-mysql-perl (4.020-1build2) ...
Setting up MysqL-clIEnt-core-5.5 (5.5.52-0ubuntu0.12.04.1) ...
Setting up libterm-readkey-perl (2.30-4build3) ...
Setting up MysqL-clIEnt-5.5 (5.5.52-0ubuntu0.12.04.1) ...
Setting up MysqL-server-core-5.5 (5.5.52-0ubuntu0.12.04.1) ...
Setting up MysqL-server-5.5 (5.5.52-0ubuntu0.12.04.1) ...
160928 10:56:48 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160928 10:56:48 [Note] /usr/sbin/MysqLd (MysqLd 5.5.52-0ubuntu0.12.04.1) starting as process 6166 ...
MysqL start/running,process 6304
Setting up libHTML-template-perl (2.10-1) ...
Setting up MysqL-server (5.5.52-0ubuntu0.12.04.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing Now taking placeMysqL教程

安装过程中输入root的密码即可;MysqL教程

3.安装成功,基本配置MysqL教程

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.问题解决MysqL教程

(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:不区分大小写MysqL教程

5.基本服务命令MysqL教程

# 启动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:MysqL教程

sudo apt-get autoremove MysqL* --purgesudo apt-get remove apparmorsudo apt-get install MysqL-server MysqL-common

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

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持内存溢出PHP.MysqL教程

总结

以上是内存溢出为你收集整理的Mysql实例Linux(Ubuntu)下Mysql5.6.28安装配置方法图文教程全部内容,希望文章能够帮你解决Mysql实例Linux(Ubuntu)下Mysql5.6.28安装配置方法图文教程所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1162235.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-01
下一篇 2022-06-01

发表评论

登录后才能评论

评论列表(0条)

保存