mysql -h<host name> -u<username> -p<password> <database name> < my-dump.file
mysqldump -h<host name> -u<username> -p<password> <db name> <table name> > my-dump.file TIP: When dumping tables or databases, it’s worth adding –quote-names as a parameter, just in case you may have used a reserved word as a table or column name.
mysqldump -h <host name> -u<username> -p<password> <db name> > my-dump.file
This can be accomplished using one select statement. It involves using the REPLACE, LEFT and CAST functions. Say we have this string: 1. This is no. 1 9. This is no. 9 10. This is no. 10 If you use
This is a tricky one, but the best way to go about it is to first reverse the string then find the first occurence of the string. Then subtract the length of the string from the location of the string
The best way of doing this is to use the command now() in your sql statement for both date and time, e.g.: INSERT INTO MYTABLE (MYDATE, DESCRIPTION) VALUES (now(), description); If you just want the date only then use CURDATE()
Write a SELECT that includes the following text: SHOW TABLES FROM <databaseName>; This will present you with a list of the MySQL data dictionary type tables in your database, you can then also add a ‘WHERE’ or ‘LIKE’ command to