Linuxmysqljdbc permission question _ MySQL

Source: Internet
Author: User
For linuxmysqljdbc permission problems, first go to mysql and log on to mysql as root, and then enter the following content.
Mysql> grant all privileges on [dbname]. * to '[user]' @ '[hostname]'


Identified by '[password]';


Exception:

When DateTest is run, the screen prompts "Server configuration denies access to data source"

Solution:

First enter mysql and log on as root, and then enter the following content.


Mysql> grant all privileges on [dbname]. * to '[user]' @ '[hostname]'
Identified by '[password]';


(Note: Here, replace dbname with your database name, which is test in DateTest; replace user with your user name, which is root by the author; replace the hostname with the machine on which the java program runs. The author runs the hostname on the local machine, that is, 'localhost'. replace the password with the password of your mysql User. The author has no password, that is ''.)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.