The sample files for MX 2004 include a SQL script capable of creating and populating a sample MySQL database.
Before starting, make sure MySQL is installed and configured on your local or remote computer.
If you installed to its default location, the path to the script file is as follows:
If the computer running MySQL is a Windows computer, copy the insert.sql script to MySql\Bin. If the computer running MySQL is a Macintosh, copy the insert.sql script to your Documents folder in your home folder.
Note: On the Macintosh, you should be able to run mysql from any directory; it should have been added to your path during installation of MySQL. If the following step doesn't work on the Macintosh, though, try typing /usr/local/bin/mysql instead of mysql .
For example, if your MySQL user name (also known as an account name) and password are Tara and Telly3, then enter the following command:
mysql -uTara -pTelly3If you don't have a password, omit the -p argument as follows:
mysql -uTaraIf you didn't define a user name while configuring your MySQL installation, enter root as the user name, as follows:
mysql -urootThe MySQL client's command prompt appears, as follows:
mysql>MySQL creates a new database, but it doesn't contain any tables or records yet.
In Windows, use the following command:
mysql -u User -p Password TrioMotors < insert.sqlOn the Macintosh, use the following command:
mysql -u User -p Password TrioMotors < ~/Documents/insert.sqlThis command uses the insert.sql file to add tables and records to the TrioMotors database you created in step 5.
After creating the MySQL database, create a database connection to it in .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100