I'm trying to use Entity Framework Reverse Engineer Code First with MySQL DB, I have installed these: mysql-for-visualstudio-1.2.3 & mysql-connector-net-6.9.3
The connection to MySQL DB seems to work:
I get the following error:
System.Data.ProviderIncompatibleException: The provider did not return
a ProviderManifestToken string. --->
MySql.Data.MySqlClient.MySqlException: Authentication to host
'localhost' for user 'root' using method 'mysql_native_password'
failed with message: Access denied for user 'root'#'localhost' (using
password: NO) ---> MySql.Data.MySqlClient.MySqlException: Access
denied for user 'root'#'localhost' (using password: NO)
I tried a lot of solutions found on the internet but nothing works.
Here is the connection string I have in the web.config:
<add name="TFEContext" providerName="MySql.Data.MySqlClient" connectionString="server=localhost;
port=3306;database=tfe_schema;uid=root;password=********"/>
After 2 days of search, I checked the box "Save my password" and it's working but the password to access the MySQL server is hardcoded in the web.config.
Related
I am trying to create a java spring application with mysql conenction and I am receiving this error :
Access denied for user 'aurelian'#'localhost' (using password: NO)
Mind you that I have user/password and in my application properties, I have my server on, and the password it is correct:
`######## Database Properties #######
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/spring_reddit_clone
spring.datasource.username=aurelian
spring.datasourxce.password=XXXXXXXXXXXXXX
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto=update
spring.datasource.initialize=true
spring.jpa.show-sql=true**strong text**`
Also I am using mysql-connector-java-8.0.25.jar so I do not have any ideeas.
Best Regards,
Aurelian
Typo alert.
Change datasourxce to datasource
spring.datasource.password=XXXXXXXXXXXXXX
I'm running Centreon Entreprise Server (CES) 3.3 and added NagVis (1.8.x). They are on a virtual machine (Virtualbox).
When I suceeded in giving the rights to NagVis to reach my Centreon data, Centreon started displaying : "Database error: Could not connect to database", though the centreon user has all privileges on "centreon" and "centreon_storage".
Here's my central-broker-master.log :
[1467987167] error: storage: rebuilder: could not connect to Centreon Storage database: could not open database: Access denied for user 'centreon'#'localhost' (using password: YES) QMYSQL: Unable to connect
[1467988484] error: TCP: error while sending data to peer 'localhost:5670': The remote host closed the connection
[1467988492] config: module applier: loading directory '/usr/share/centreon/lib/centreon-broker'
[1467988492] config: correlation: invalid correlation configuration, correlation engine is NOT loaded
[1467988492] config: applier: 14 modules loaded
[1467988492] error: could not open database: Access denied for user 'centreon'#'localhost' (using password: YES) QMYSQL: Unable to connect
[1467988492] error: TCP: could not connect to localhost:5670: Connection refused
[1467988492] error: could not open database: Access denied for user 'centreon'#'localhost' (using password: YES) QMYSQL: Unable to connect
(the last error is written hundreds of times ...)
And I couldn't find other errors in different logs. (Or wasn't able to find the right logs ...)
The 'centreon' user has the rights on the databases with the IP address of my server as well as with my coputer's address. (This could have been a matter of rights from a distant location)
I don't know any other way to grant my 'centreon' user with extra rights on the database -- Is it even a valid idea to grant my user with all privileges ?
Thanks
EDIT : I tried to solve the problem by using this post : MySQL ERROR 1045 (28000): Access denied for user 'bill'#'localhost' (using password: YES) (I actually had a ''#'localhost' user), but my access to Centreon web is still denied.
Hi I tried to connect to mysql using the wrong password. I finally made it there but now as I try to reach my homepage www.hari.se I just get following ;
Warning: mysql_connect(): Access denied for user 'hari.se'#'csea04.cliche.se' (using password: YES) in /home/virtual/hari.se/public_html/PHP/db.php on line 2
Warning: mysql_select_db(): Access denied for user 'root'#'localhost' (using password: NO) in /home/virtual/hari.se/public_html/PHP/db.php on line 3
Warning: mysql_select_db(): A link to the server could not be established in /home/virtual/hari.se/public_html/PHP/db.php on line 3
Warning: mysql_query(): Access denied for user 'root'#'localhost' (using password: NO) in /home/virtual/hari.se/public_html/index.php on line 7
Warning: mysql_query(): A link to the server could not be established in /home/virtual/hari.se/public_html/index.php on line 7
Access denied for user 'root'#'localhost' (using password: NO)
Please friends anyone who can help? Hari
your script is not able establish the connection to the database
also you should insert true information about the mysql connection into db.php file
and you can't insert the wrong password !!!!
you have some variable in this file
similar to below:
$database_hostname = 'localhost (as default) or your server hostname';
$database_username = 'root (as default) or your database username';
$database_password = '(in some local web servers we don't have any password for database but in hosting servers usually we have a defined password ) such as (3R8=&3pHEJ+J)';
$database_name = 'you must insert your database name in here';
$connection_mysql=mysql_connect($database_hostname,$database_username,$database_password);
mysql_select_db($database_name,$connection_mysql);
--------------
or in the simple mode might be similar below:
$connection_mysql=mysql_connect(localhost,your_database_name,your_database_password);
mysql_select_db($database_name,$connection_mysql);
i think your information is incorrect please check your entered information in db.php (also the low level Possibility is your account suspended or limited in server by admin)
I'm attempting to connect a python web application to a local database via SQLAlchemy.
I have configured the following connection string:
sqlalchemy.url = mysql+mysqlconnector://root:root#localhost:3306/db_mother
When I use the above, I get the following error (after a long stack trace):
sqlalchemy.exc.ProgrammingError: (ProgrammingError) 1045 (28000): Access denied for user 'root'#'localhost' (using password: NO) None None
When I change the connection string to this:
sqlalchemy.url = mysql+mysqlconnector://ripley:amanda#localhost:3306/db_mother
I get an expected error, because that user is not configured with that password in the db:
sqlalchemy.exc.ProgrammingError: (ProgrammingError) 1045 (28000): Access denied for user 'ripley'#'localhost' (using password: YES) None None
So, in the first case I have a valid db user and password (which I can use to connect via command line or SequelPro), and it says I'm not using a password. In the second case it seems to understand that there is a password. Why does it not have this understanding in the first place?
I am using python3, sqlalchemy, mysql-connector-python and pyramid. It's also of note that if I strip the password from the root user, it works fine.
I have been working on creating report using BIRT with MySql. While I am able to run the report successfully using BIRT viewer, when I try to integrate with tomcat, it gives the below error
org.eclipse.birt.report.engine.api.EngineException: An exception
occurred during processing. Please see the following message for
details: Cannot open the connection for the driver:
org.eclipse.birt.report.data.oda.jdbc.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Failed to get
connection. SQL error #1:Access denied for user 'root'#'localhost'
(using password: NO) ; java.sql.SQLException: Access denied for user
'root'#'localhost' (using password: NO)
Can anyone please help?
the error message indicates that you do not have permissions to loging to MySQL database using root without any password. As far as I remember, default password for root is 'sa' in MySQL. Please check whether you need any password for your database.