This action might not be possible to undo. Are you sure you want to continue?
1 dari 9
com. This paper discusses following topics for every database Download and installation Setting up ODBC driver Establishing connection Important concepts Security Creating new database and users Troubleshooting MySQL According to EvansData. On the other hand.htm Document information .mysql.html Several installation packages are available for MySQL.0 was available as a beta release. MySQL ODBC connector 5.mysql. visit http://dev. This whitepaper talks about accessing such databases from WinSQL.html We recommend using the download package that comes with an installer.0. However. Almost every open source database use ODBC as one of primary access mechanism to the underlying data and therefore. The document assumes you are installing the server on Windows.html#downloads ODBC Driver: http://dev. Enterprise edition is geared toward mission critical applications backed up with full support from MySQL. At the time of this document. Community server is available for free and does not include support.Connecting to MySQL using ODBC http://web. RDBS Download: http://dev. WinSQL provides a perfect solution to access all of them using one easy-to-use tool. Run the installer on your machine. The discussion below assumes that you are using the community server. Quick Links Document ID: 762 Subject: Connecting to MySQL using ODBC Creation date: 7/29/09 2:19 PM Last modified on: 7/29/09 2:26 PM Download Purchase Products WinSQL JaySQL Mail Junction SynaMan Syncrify SynTail Knowledge Base White Papers Using MySQL with WinSQL Open source databases are now being trusted to store vital data in many companies. Towards the end of installation process it will prompt you to configure the MySQL server. Download and installation MySQL can be downloaded from http://www.51.html for a description of how to choose an installation package for Windows platform.com/downloads/connector/odbc/5.mysql. MySQL is the most popular database with over 53% market share among other open source RDBMS. This database comes in two flavors: Community Server Edition and Enterprise Edition. if you are interested in a more stable but older release.synametrics. 2 dari 9 23/03/2011 12:47 . The following section talks about accessing MySQL with WinSQL.0.com/downloads/mysql/5. Initial tests with WinSQL using this driver did not show any problems.com/downloads/connector/odbc/3.com/doc/refman/5.mysql.mysql.0/en /windows-choosing-package. For installation on other platforms refer to the documentation that comes with MySQL. Refer to http://dev. which will copy necessary files on to your hard disk.com/MySQL.
3 dari 9 23/03/2011 12:47 .com/MySQL.synametrics.htm Select detailed Configuration option in the configuration window.Connecting to MySQL using ODBC http://web. Follow the instructions on the screen until you come to the TCP/IP network port.
check the ?Enable root access from remote machines?. More discussion about the root account will follow in the authentication section. One important point to remember is to turn Windows Firewall off during the configuration process. if you are planning to access this database from another machine using the root access. Another important value to remember is the password for the ?root? account. The default value for this parameter is 3306 and can be changed to any number below 65000. You will have to specify this number when creating an ODBC DSN for MySQL.Connecting to MySQL using ODBC http://web. which refers to the TCP/IP port.synametrics. 4 dari 9 23/03/2011 12:47 . This is because it may prevent MySQL service from listening on the TCP/IP port In that case you might get the following error. This is done for security reasons. By default ?root? access is only available for the local machine. Once all information is collected.htm It is important to remember the value on this screen.com/MySQL. However. the Configuration wizard will run a set of scripts to save the values specified by the user.
2. Ensure that the MySQL ODBC driver is installed on the machine by clicking the Drivers tab.com/MySQL. Following screen is displayed. Start the ODBC manager. Linux or any other supported operating system.synametrics. 5. click the Add button and select MySQL/Connector ODBC from the list. Therefore. This can be done from within WinSQL by clicking File/Open ODBC manager. which is used to specify connection settings.Connecting to MySQL using ODBC http://web. 3. you need to install that separately. The link to download this driver is shown above.htm Once the database is correctly setup and installed. All screens in the installer are self-explanatory and there are no setup options as all the installer does is to copy files and change some registry settings. or by double clicking the Data Sources (ODBC) link in Windows Control Panel. Next click the either User DSN or System DSN tab to create a DSN 4. you need to create an ODBC DSN. Installing the ODBC driver The ODBC driver for MySQL is not bundled with the server. you can check its status from Windows Services module in Control Panel. The steps below show how to create a DSN referring to a MySQL database running either on Windows. Configuring the ODBC driver Before connecting to the database. To add a new data source. 5 dari 9 23/03/2011 12:47 . 1.
Important Concepts Default Values Following table lists values for some important parameters in MySQL database. 6 dari 9 23/03/2011 12:47 . you will see your newly created DSN for MySQL.com/MySQL. which enables MySQL specific features in WinSQL. In the connection window.Connecting to MySQL using ODBC http://web. Leave this to ?mysql? Port: Refers to TCP/IP port. Database: This is the name of the database. If this is the first time. Data Source Name: A unique name identifying this data source Description: An friendly description Server: Host name or IP address where MySQL server is listening User: User ID. try ?root? Password: This is the password for ?root?. which you specified when installing the server. When done click Ok Establishing Connection from WinSQL After creating ODBC DSN. 6. Default value is 3306.synametrics.htm The table below describes what each parameter mean. IMPORTANT: Ensure that you select MySQL as the Database type. start WinSQL.
8 in MySQL 5. WinSQL displays the name of the current database in the catalog window. By default.com/MySQL. Creating new database Every instance of MySQL may have one or more database.stores all server specific values and global information 2.synametrics. In addition to granting connection access.Connecting to MySQL using ODBC http://web. New users can be created using two methods: 1. Use the following SQL statement to create a new database. Submitting a CREATE USER query 2. This default setting is modified by the Configuration Wizard that is run automatically after installation. Example 2 also grants other privileges such as creating tables and modifying data. Submitting a GRANT statement Example 1: CREATE USER 'scott'@'%' IDENTIFIED BY 'tiger' CREATE USER 'scott'@'localhost' IDENTIFIED BY 'tiger' Example 2: GRANT ALL PRIVILEGES ON *. For more information about security.* TO 'scott@localhost' IDENTIFIED BY 'tiger' WITH GRANT OPTION Both examples above create a user name 'scott'. Refer to MySQL manual for more details. Wild card characters such as ?%? or ?_? can be used to specify a host as well as subnet mask. Every user in MySQL can be restricted not only by a pair of user id and password strings. sets his password to 'tiger' and grants connection access from any machine.htm TCP/IP Port: Login ID: Password: System database name: 3306 root <blank> mysql Security As mentioned earlier.empty database for testing purposes It is recommended that you create another database for your needs rather than creating tables in the existing database. mysql . refer to section 5. CREATE DATABASE NewDbName The name of the database is specified in the ODBC DSN and therefore. In the above example we specified ?mysql? as the database name. test .* TO 'scott@%' IDENTIFIED BY 'tiger' WITH GRANT OPTION GRANT ALL PRIVIDEGES ON *. Therefore. you always connect to that database. it creates two databases during installation: 1. the password is blank and client access is restricted to local machine. When MySQL is first installed. MySQL creates a user called ?root?. 7 dari 9 23/03/2011 12:47 . when creating a new user you have to specify the host name where this user is authorized to connect from. It can also be modified later on by submitting SQL queries.0 reference manual. but also by the host machine's IP address.
. as preferences i type this code "CREATE USER 'AQ01'@'localhost' IDENTIFIED BY 'xxxxxxxx'".1. Reinstall the ODBC driver to rectify the problem.com/MySQL..synametrics. particular when the database is installed on a remote machine. Posted by mohana sai on 12/31/09 2:10 AM how to know whether it have been installed or not Add a comment to this document 8 dari 9 23/03/2011 12:47 .168.Connecting to MySQL using ODBC http://web. BUT still cant connect may be theres something wrong with the codes. password is incorrect.5' (using password: YES) No user exists with the name 'scott'. or the host 192.... the TCP/IP port number in the DSN settings does not match with what is configured on the server..1. then "GRANT ALL PRIVILEGES ON databasename.htm You can switch to a different database either by selecting the desired value from this pick list or issuing a ?USE? statement.5 does not have access to the database. ty and i'm verry glad id someone can help me.. Message: Solution: Often users run into connection problems when an appropriate user does not exist.. For example: USE NewDbName Troubleshooting Following is a list of common error messages and their solution Message: Solution: Access denied for user 'scott@192.* TO 'AQ01'@'localhost'" IDENTIFIED BY 'xxxx'.... Message: Solution: Can't connect to MySQL server on 'hostname' Occurs when you have specified an incorrect IP address or host name in the DSN. the necessary DLLs files are not found or the files are corrupted. User comments Posted by akikarijut on 11/29/10 7:11 PM how to setting mysql odbc server from other host becouse i had tried to give the privileges to that host but still cant connet it said 'host='AQ01'' is not allowed .168.. or the server is currently not running Specified driver could not be loaded due to system error 126 Either MySQL ODBC driver is not installed.
Your name: Your email: Hide my email address Verification code: Enter the verification code you see above more submitting your tip Tip: Please limit tips to 1000 characters 9 dari 9 23/03/2011 12:47 .htm Do you have a helpful tip related to this document that you'd like to share with other users? Please add it below. Your name and tip will appear at the end of the document text.synametrics.Connecting to MySQL using ODBC http://web.com/MySQL.