![]() ![]() The mysql tool supports the following command-line options: To exit from mysql type quit at the mysql> command-prompt. If a command is not terminated by a semi-colon, pressing enter simply continues the current command on the following line. Typing help at this prompt will display a list of the commands supported by the tool (listed below).Ĭommands are terminated by a semi-colon ( ). Once mysql is running, commands are entered at the mysql> prompt. ![]() If the mysql client is running a different system to the MySQL server, the -h flag may be used to specify the name of the remote host together with -P to specify the port: mysql -h myDBServer -p 5678Ī list of command-line options can be obtained running mysql -help at the command-prompt (listed below). The above command will prompt for the password for user john before allowing access to the database management system. For example, if your database server requires a username and password to gain access the -u and -p command-line options may be used respectively: mysql -u john -p If you see an error message, it may be that your database system is configured to require login credentials, or that the server is running on a different system. Your MySQL connection id is 234343 to server version: 5.0.27 ![]() The above command will display the following output: Welcome to the MySQL monitor. Throughout this book the capabilities of the mysql tool will be covered in great detail.Īssuming MySQL has been installed the mysql tool may be loaded at the operating system command-prompt as follows: mysql From the mysql command-prompt it is possible to issue a wide range of commands to the database server such as creating and deleting databases and tables, searching for data, adding new rows and much more. mysql is a command-line client tool that is installed as standard with the MySQL package. The mysql tool is probably the most useful utility and is the tool that you will likely use the most as you learn and continue to use MySQL. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |