

Media Server can use this string to connect to the database server.Īn optional description for the data source. The MySQL Connector/ODBC Data Source Configuration dialog box opens.Ĭomplete the Connection Parameters fields: Data Source Name
#Mysql commands driver#
Select the MySQL ODBC Unicode driver from the list and click Finish. The Create New Data Source dialog box opens.

The ODBC Data Source Administrator dialog box opens.
#Mysql commands windows#
In the Windows Control Panel, click System and Security. Is the user name that Media Server will connect as. GRANT EXECUTE ON databaseName.* TO userName GRANT SELECT, INSERT, UPDATE, DELETE ON databaseName.* TO userName Run the GRANT commands: GRANT CREATE TEMPORARY TABLES ON databaseName.* TO userName If security is not a consideration, grant all privileges. Grant privileges to the user that Media Server will connect as. Running the script non-interactively from the terminal ensures that the script terminates if an error occurs. Is the name of the database you created in Step 2. In the Windows Command Prompt, run the following command: mysql -u userName -p -v -D databaseName -e "source path/my.sql" This script sets up the database schema that Media Server requires. Run the my.sql script provided in the Media Server installation directory. Database nameĪny that is compatible with the encoding.įor example: CREATE DATABASE myDatabase CHARACTER SET utf8 COLLATE utf8_unicode_ci Run a CREATE DATABASE command to create a new database. In the Windows Command Prompt, run the command: mysql -u userName -p If the directory path is not added to the PATH variable, you must specify the mysql.exe file path in the Command Prompt to start psql. That’s number_of_records * sleep_time which is 3 * 10.This step enables you to use the command mysql to start the mysql command-line tool from the Windows Command Prompt. When we run the SQL code, MySQL will wait for 30 seconds. Where n is the sleep time, and table_name is your table name.įor example, in the following, the table users has three records.

With SELECT SLEEP(10), MySQL cannot do other work for ten seconds. This number determines the number of seconds SLEEP() will occupy in the server thread. SELECT SLEEP(10) įrom the SQL above, the MySQL SLEEP() function takes the number 10 as a parameter.
#Mysql commands how to#
The following is how to use SLEEP() in MySQL. You’ll also learn the behavior of SLEEP() in a query statement. The first involves using SLEEP(), and the second is DO SLEEP(). This article teaches you two ways to show how to use the MySQL sleep command.
