LCKB
{Shell} Simple SQL Export - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Release Zone (https://lckb.dev/forum/forumdisplay.php?fid=190)
+---- Forum: General Releases (https://lckb.dev/forum/forumdisplay.php?fid=127)
+----- Forum: General Server Releases (https://lckb.dev/forum/forumdisplay.php?fid=212)
+----- Thread: {Shell} Simple SQL Export (/showthread.php?tid=4670)



- Groby - 02-09-2016



Export your DB from Shell.

#!/bin/sh
echo "==============================================================="
echo -e " \033[31m1. Start SQL-Export\033[0m "
echo -e " \033[33mSQL-Export is Running.\033[0m "
echo "==============================================================="

cd /home/script/DB_Backups
mysql -h 127.0.0.1 -u root newproject_db_auth < newproject_db_auth.sql

echo "==============================================================="
echo -e " \033[31m2. SQL-Export.\033[0m "
echo -e " \033[36m DONE\033[0m "
echo "==============================================================="

 




- WorldOfWars - 02-09-2016

10 seconds google search but nice.




- Wizatek - 02-09-2016


Not sure if its doing what you say.

This is to import, not export




- Groby - 02-09-2016


Not sure if its doing what you say. This is to import, not export

Sql data is on root  export it to mysql .




- Wizatek - 02-09-2016


That is called importing.

Exporting is when you make a dump from the database to file.




- peter3301 - 02-09-2016


+1 wiza

If i import my db:

mysql -u root newproject_data < newproject_data.sql
mysql -u root newproject_db < newproject_db.sql
mysql -u root newproject_auth < newproject_auth.sql
mysql -u root newproject_post < newproject_post.sql