MySQL is most commonly entered through telnet. (A nice Telnet program, Easyterm, can be found at http://www.arachnoid.com) Once the telnet connection to the web server has been accomplished, a second command provides access to the MySQL server. The procedure to make these connection is as follows: 1. Connect to telnet. This involves the insertion of the given ISP username and password.
2. Connect to MySQL. This involves the insertion of the username and password given specifically for MySQL use. This information has probably been provided to you at your request to the ISP provider.
Or mysql -h hostname -u username --password=password The user will then be prompted for a password, as prompted by -p.
Assuming MySQL has been correctly installed and configured, the user will see output similiar to the following:
(Note: If an error message pertaining to "Access denied" is the result of connection attempts, you should consult the MySQL documentation included with the software, the MySQL mailing list found at http://www.mysql.com, as well as your ISP provider. These resources will aid greatly in resolving these problems.) Once connected to the database, we are free to execute the various commands of the MySQL language. However before we are able to modify the database, we must first connect to it, via the command:
Result:
You now are connected to the database. Note that the command was followed by a semi-colon (;). Almost all commands in MySQL are followed by a semi-colon. At the disposition are a number of administrative commands. These commands can be viewed simply by typing help, \h or ? at the command line:
Perhaps not all functions will not be immediately useful, however it would be wise to test each one to see exactly what it entails. However, functions such as: status, use, print, connect, clear, and quit will probably prove to be very useful from the start, so be sure to become familiar with them. You should now have a basic understanding of how to connect to the server, select the database, and perform basic commands. The next section will cover the concepts and techniques needed to properly setup up the database for manipulation.
blog comments powered by Disqus |