📜  在devilbox中上传sql数据库-Shell-Bash代码示例

📅  最后修改于: 2022-03-11 14:51:17.661000             🧑  作者: Mango

代码示例1
# Navigate to the Devilbox directory
host> cd path/to/devilbox

# Enter the PHP container
host> ./shell.sh

# Create new database if not present
mysql -u root -h 127.0.0.1 -p -e 'CREATE DATABASE my_wp;'
# OR START MYSQL THEN CREATE DATABASE
mysql -u root -h mysql
CREATE DATABASE my_database

# Start the import
mysql -h mysql -u root -p my_db_name < /shared/backups/mysql/my_db_name.sql