MySQL supports 4 TEXT data types, TINYTEXT, TEXT, MEDIUMTEXT and LONGTEXT.
TEXT data types are also able to store much more data than VARCHAR and CHAR text types so TEXT types are what you need to use when storing large amount of content in a database table.
The maximum amount of data that can be stored in TEXT data types are as follows:
TINYTEXT 256 bytes
TEXT 65,535 bytes (64kb)
MEDIUMTEXT 16,777,215 bytes (16MB)
LONGTEXT 4,294,967,295 bytes (4GB)
- Payal Maru
Team Lead - J2EE Application Development
NAVSYA Technologies Pvt. Ltd.
www.navsya.com
Showing posts with label mySQL. Show all posts
Showing posts with label mySQL. Show all posts
Saturday, January 29, 2011
mySQL Database Backup and Import
For mySQL database backups use following commands:
c:\>mysqldump -u [USER] -p -P [PORT] --all-databases > [FILE]
For example, the command will look like this:
c:\>mysqldump -u root -p -P 3306 --all-databases > mydump.sql
After you press enter you will be asked for password and then your backup file will be created.
You can also choose to export/backup only select databases.
For restoring the backup:
mysql -u root -p -P 3306 < mydump.sql
Note that in this case while restoring the databases all the existing databases / tables with the same names will be dropped and recreated with the data in the dump file.
Note: If your mySQL bin directory is not specified in the PATH variable you will need to go to the directory where mySQL is installed and then fire this command
- Siddhesh Prabhu
Team Lead - J2EE Application Development
NAVSYA Technologies Pvt. Ltd.
http://www.navsya.com
c:\>mysqldump -u [USER] -p -P [PORT] --all-databases > [FILE]
For example, the command will look like this:
c:\>mysqldump -u root -p -P 3306 --all-databases > mydump.sql
After you press enter you will be asked for password and then your backup file will be created.
You can also choose to export/backup only select databases.
For restoring the backup:
mysql -u root -p -P 3306 < mydump.sql
Note that in this case while restoring the databases all the existing databases / tables with the same names will be dropped and recreated with the data in the dump file.
Note: If your mySQL bin directory is not specified in the PATH variable you will need to go to the directory where mySQL is installed and then fire this command
- Siddhesh Prabhu
Team Lead - J2EE Application Development
NAVSYA Technologies Pvt. Ltd.
http://www.navsya.com
Subscribe to:
Posts (Atom)