Skip to content
View in the app

A better way to browse. Learn more.

Gear Crushers

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Export - Import mySQL Database command line

Featured Replies

Okay, my experience on exporting and importing mySQL Database


 


Exporting (Pretty Easy)


[root@ipsetest ~]# mysqldump -u root -p oaipse > oaipse.sql


 


 


 


Importing (not too bad but learned a couple of things)


[root@ipseweb ~]# mysql -u root -p oaipse < oaipse.sql

Enter password:

ERROR 1153 (08S01) at line 732: Got a packet bigger than 'max_allowed_packet' bytes

 

To fix ERROR 1153 perform the following otherwise your database imported successfully.


[root@ipseweb ~]# mysql -u root -p

Enter password:


mysql> set global net_buffer_length=1000000;


mysql> set global max_allowed_packet=1000000000;

mysql> exit

Rerun the import command as noted above before error

 

Verify your database imported


[root@ipseweb ~]# mysqlshow -u root -p

 


 

 




 


  • 3 weeks later...
  • Author

Show Databases





SHOW DATABASES;





Create database





mysqladmin -u root -p create oaipse




Show mySQL Users





select user,host from mysql.user;





Create new user





CREATE USER 'oauser'@'localhost' IDENTIFIED BY 'secure09';





Grant Privileges





GRANT ALL PRIVILEGES ON *.* TO 'oauser'@'localhost';

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;





TO EXPORT DB TO A FILE:





mysqldump --add-drop-table -p DATABASENAME --user=DATABASEUSER --password=DATABASEPASSWORD > /FULL/PATH/TO/ROOT/MYBACKUP.SQL






TO IMPORT DB FROM A FILE:





mysql --user=DATABASEUSER --password=DATABASEPASSWORD DATABASENAME < /FULL/PATH/TO/ROOT/MYBACKUP.SQL



Replace the uppercase words with your own values.



DELETE Database





mysql> drop database


Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.