|
MySQL database structure can be viewed with applications like phpMyAdmin, but it takes a special login and only shows you one table structure at a time. Sometimes, as in planning data migration projects, you really need to see all the tables at one time, with all their field names and structure attributes. There are mysql commands like SHOW COLUMNS, DESCRIBE and INFORMATION_SCHEMA, but these generally require help from a database pro, and you don't always have one of those handy. So, I've written a MySQL database structure script that you can download for free, that will give you dynamic structure reports of all your database tables in a single view. Remember, when planning migrations from Windows platforms and even some other -x type databases, that not all field types are equal. For instance, the variable string type of MS SQL can exceed the varchar limit of 255 in MySQL. Your best bet is to hire a pro, like (ahem..), yours truly. But even then, it can help if you understand what is happening with your data, and to that end, I hope this script will come in handy. Before running it, be sure and replace the variables in the first few lines. Examle: $dbhost = 'localhost'; $dbuser = 'dbusername'; $dbpass = 'dbpassword'; $dbname = 'dbname';
The first variable - $dbhost, will likely remain "localhost", but in the other three you will need to replace the values between the quotes with your database user name, password and database name, respectively. OK, here's the sample page for your dynamic MySQL Database Structure Script. This particular page is static (we don't really want to give out our own database structure), but it was made by the mysql dynamic structure script, so you can see what your results will resemble. There is a download link in the top right corner of that page where you can download (for free) your own copy of this script to run on your web server.
|