1 启动关闭
启动 XAMPP
# ./lampp start
停止 XAMPP
# ./lampp stop
重启 XAMPP
# ./lampp restart
2 数据库
进入mysql
# /opt/lampp/bin/mysql -uroot -p
xampp安装完毕后,默认数据库密码为空
Enter password:
这里直接Enter就可以进入数据库
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 Server version: 10.1.21-MariaDB Source distribution Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. MariaDB [(none)]>
设置root用户密码
set password for [email protected] = password(‘123‘);
创建用户并设置远程访问权限
MariaDB [(none)]> CREATE USER ‘用户名‘@‘%‘ IDENTIFIED BY ‘密码‘; MariaDB [(none)]> GRANT ALL ON *.* TO ‘用户名‘@‘%‘; MariaDB [(none)]> flush privileges;
时间: 2024-11-26 14:24:00