1.下载XAMPP
官网:
https://www.apachefriends.org/zh_cn/download.html
下载链接:
https://udomain.dl.sourceforge.net/project/xampp/XAMPP%20Mac%20OS%20X/8.0.6/xampp-osx-8.0.6-0-vm.dmg
下载了好几次才下载下来,目前速度比较慢,下了一个晚上。
2.安装
点击xampp-osx-8.0.6-0-vm.dmg按照提示安装即可
3.启动服务
4.Enable Remote Access to PHPMyAdmin()
启动服务后进入HOW-TO guides:http://192.168.64.2/dashboard/docs/access-phpmyadmin-remotely.html
具体步骤:
Within this file, find the block below:
<Directory "/opt/lampp/PHPmyadmin"> AllowOverride AuthConfig Require local ...
Update this block and replace Require local with Require all granted, so that it looks like this:
<Directory "/opt/lampp/PHPmyadmin"> AllowOverride AuthConfig Require all granted ...
5.访问pypmyadmin:
http://192.168.64.2/phpmyadmin/index.php?route=/server/privileges&viewing_mode=server
增加表和数据:
6.使用XAMPP姿态terminal,命令行链接MysqL:
/opt/lampp/bin/MysqL --user=root --password=
操作历史:
root@debian:/opt/lampp/PHPmyadmin# /opt/lampp/bin/MysqL --user=root --password=
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 89
Server version: 10.4.19-MariaDB Source distribution
copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show tables;
ERROR 1046 (3D000): No database selected
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| @R_10_4045@ion_schema |
| MysqL |
| performance_schema |
| PHPmyadmin |
| springbootdb |
| test |
| xubo |
+--------------------+
7 rows in set (0.000 sec)
MariaDB [(none)]> use xubo
Reading table @R_10_4045@ion for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [xubo]> show tables;
+----------------+
| Tables_in_xubo |
+----------------+
| test |
+----------------+
1 row in set (0.000 sec)
MariaDB [xubo]> select * from test;
+------+-----+------+------+
| name | age | data | info |
+------+-----+------+------+
| Bob | 30 | test | test |
| Bob | 30 | test | test |
+------+-----+------+------+
2 rows in set (0.000 sec)
MariaDB [xubo]>
MariaDB [xubo]> show tables;
ERROR 2006 (HY000): MysqL server has gone away
No connection. Trying to reconnect...
Connection id: 236
Current database: xubo
+----------------+
| Tables_in_xubo |
+----------------+
| test |
+----------------+
1 row in set (0.002 sec)
MariaDB [xubo]> select * from test;
+------+-----+------+------+
| name | age | data | info |
+------+-----+------+------+
| Bob | 30 | test | test |
| Bob | 30 | test | test |
+------+-----+------+------+
2 rows in set (0.000 sec)
/opt/lampp/bin/MysqLadmin --user=root password "gue55me"
改了密码之后pypmyadmin默认连接不上,需要改pypmyadmin下的config.inc.PHP,但是发现没有权限:
所以还是改回密码为空:
/opt/lampp/bin/MysqLadmin --user=root --password=12345 password ""
参考:
【1】https://www.apachefriends.org/zh_cn/download.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。