Here is how the online MySQL documentation defines a role: “A MySQL role is a named collection of privileges”.ĭoesn’t that definition alone seem helpful? However, where I only summarized them there, this current post looks to go deeper and focus solely on roles. You can surely visit, MySQL in 2018: What’s in 8.0 and Other Observations, I wrote for the Severalnines blog here where I mention roles for a high-level overview. Yet, version 8 implements an exceptional, and powerful, SQL standard feature - Roles - which alleviates one of the more redundant areas of the entire process: assigning privileges to a user. In older versions of MySQL, a multiple-user environment is established in a somewhat monotonous and repetitive manner. You can imagine (I know I do) just how difficult a task managing multiple users or groups of users within a database ecosystem is. Buyers of a service need to see their order and payment history….DBA’s need ‘root’ or similar type privileges to run the show….Developers require a slew of permissions and privileges to carry out their work….Analyst need ‘ read access‘, to garner information and insight via querying tables….However, some tables and data should be strictly off-limits (E.g., system tables). While each user does need to access the database at some level, those permissions are not all created equal.įor instance, clients and customers need access to their ‘related user account’ data, but even that should be monitored with some level of control. Database developers, administrators, analyst, etc… - Those maintaining, working with or monitoring the database infrastructure.Application, service, or program users - basically customers or clients using a service.In terms of database systems, I generally think of them in two distinct groups: You can now configure Media Server to connect to the database (see Configure Media Server).Database Security is important to any MySQL setup.In the ODBC Data Source Administrator dialog box, click OK to close the dialog box. In the MySQL Connector/ODBC Data Source Configuration dialog box, click OK to close the dialog box. If the connection failed, use the information in the message to resolve any issues.Ĭlick OK to close the Connection Test box. The Connection Test box opens containing a message describing whether the connection was successful. The name of the database that you created in Step 2. The password for the user account that connects to the database server. The user name to connect to the database server with. The port to use to communicate with the database server. The IP address or hostname of the server that the database server is installed on. 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 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. 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. This step enables you to use the command mysql to start the mysql command-line tool from the Windows Command Prompt.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |