连接Linux下 XAMPP集成环境中部署的禅道的数据库MariaDB
2016-11-22 19:25
281 查看
用mysql数据库工具连接linuxmysql环境,但是会遇到连接失败的问题,如下所示:
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122184517362-183182678.png)
这就需要涉及到另外的问题了,需要我们打开mysql的连接授权,具体的操作步骤如下:
1)在xshell里进入mysql,命令是: mysql -u root -p,然后回车,就进入到mysql.
下面是出现报错情况
[root@lam7 opt]# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
莫慌,MariaDB进入数据库的命令如下;(PS:至于'/var/lib/mysql/mysql.sock' (2)报错的问题见后续分享内容)
[root@lam7 opt]# mysql -h 127.0.0.1
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 244
Server version: 10.1.19-MariaDB Source distribution
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
2)然后输入命令: use mysql,切换到mysql的数据库,如下所示:
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
然后下面就可以查看 自己所使用的mysql(PS:到了这一步之后就可以参考
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122192054721-292034053.png)
然后就可以创建用户名密码了
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122192142612-125191895.png)
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122192351471-1680609387.png)
这样的话 数据库的账户就创建好了
账号密码也有了
然后用Navicat就可以链接上了。
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122184517362-183182678.png)
这就需要涉及到另外的问题了,需要我们打开mysql的连接授权,具体的操作步骤如下:
1)在xshell里进入mysql,命令是: mysql -u root -p,然后回车,就进入到mysql.
下面是出现报错情况
[root@lam7 opt]# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
莫慌,MariaDB进入数据库的命令如下;(PS:至于'/var/lib/mysql/mysql.sock' (2)报错的问题见后续分享内容)
[root@lam7 opt]# mysql -h 127.0.0.1
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 244
Server version: 10.1.19-MariaDB Source distribution
Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
2)然后输入命令: use mysql,切换到mysql的数据库,如下所示:
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
然后下面就可以查看 自己所使用的mysql(PS:到了这一步之后就可以参考
mysql数据库链接与创建)
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122192054721-292034053.png)
然后就可以创建用户名密码了
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122192142612-125191895.png)
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122192351471-1680609387.png)
这样的话 数据库的账户就创建好了
账号密码也有了
然后用Navicat就可以链接上了。
![](https://images2015.cnblogs.com/blog/911086/201611/911086-20161122192659878-1123577881.png)
相关文章推荐
- Linux下xampp集成环境安装配置方法 、部署bugfree及部署禅道
- Linux下xampp集成环境安装配置方法 、部署bugfree及部署禅道
- 打造前端 Deepin Linux 工作环境——配置 XAMPP 集成环境2 虚拟主机、数据库
- windows下xampp集成环境安装配置方法 、部署bugfree及部署禅道
- 解决Linux环境下安装xampp之后外部无法连接MySQL的问题
- linux下nginx和xampp集成环境启动失败的问题
- 阿里云服务器连接以及centos 搭建 web java环境(linux java部署 tomcat部署)
- 阿里云服务器linux环境,从启动tomcat服务器外网访问--->绑定域名--->Navicat远程连接mysql--->阿里云服务器部署项目过程中,一定会遇到的五大问题;
- 毕业设计那点事 - Linux环境数据库连接失败
- 在xampp集成环境下使用 thinkphp 连接oracle
- 阿里云服务器连接以及centos 搭建 web java环境(linux java部署 tomcat部署)
- Linux中使用xampp连接数据库失败
- 部署mariadb数据库到linux(源码编译安装)
- Linux环境下设置mysql支持远程连接数据库(转载)
- XAMPP For Linux —— Linux下的PHP集成环境包
- Linux环境下运行Qt程序连接数据库报错
- 在xampp集成环境下使用 php 连接oracle
- 在linux环境下python连接msql数据库
- [原]Linux环境-Jenkins实战-分布式构建-自动化持续集成-自动化部署-gitlab-svn-shell启动tomcat
- 线上线下部署的时候由环境变量来选择数据库的连接