Unable to Configure external MySQL Databaser to Owncloud? - mysql

Hi I am trying to setup Owncloud with an external MySQL DB.
In MySQL server - I have changed bind-address= 0.0.0.0 , created a user and granted , flushed privileges.
Now i am able to connect to MySQL from CMD in Owncloud server.
When I try to setup getting an error
" Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1044] Access denied for user ‘oc_root2’#’%’ to database ‘owncloud’ "
Can some one please help.

You should consider using Nextcloud. This is more actively maintained, fully open source and has more features. Setting up Nextcloud via the command line works fine for me. I suggest that you use the setup-nextcloud.php script and everything should be automatic.

Related

Error 1045 access denied from DMS source database

I got below error while try to migrate database from Mysql enterprise version 8.0.23-commercial even I grant all REPLICATION CLIENT, REPLICATION SLAVE to migration user I still got this error and also turn on binlog
[SOURCE_CAPTURE ]E: Error 1045 (Access denied for user 'migration'#'IP' (using password: YES)) connecting to MySQL server 'IP' [1020414] (mysql_endpoint_capture.c:297)
2021-09-28T17:46:20 [SOURCE_CAPTURE ]E: Errors in MySQL server binary logging configuration. Follow all prerequisites for 'MySQL as a source in DMS' from https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html or'MySQL as a target in DMS' from
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html [1020414] (mysql_endpoint_imp.c:778)
If migrate full load only via this endpoint it successfully this error found when full load + on going migration
To replicate database migration must use TCP/IP port. You should check this port and run database migration again.
I faced same issue while working on AWS DMS RDS mysql to MSK Kafka data migration. I resolved by configuring mysql source endpoint with Secure Socket Layer (SSL) mode verify-ca.
To get a certificate bundle that contains both the intermediate and root certificates for all AWS Regions, download from https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem.
You can valuvate your error in following doc
https://www.percona.com/blog/2019/07/05/fixing-a-mysql-1045-error/

Mysql not accepting connections from some sources

I have a MySQL server (v8.0) running on windows server 2016. I also have IIS running and PHPMyAdmin installed. In addition to this, I have a PHP web application which runs on the same server (under IIS) which accesses the MySQL database. Finally, I have several Python scripts which access the MySQL database.
Somehow, I have lost the ability to access the database from the Python scripts, but the web application still works and PHPMyAdmin can see and modify the database.
Even more strangely, I can no longer user MySQL Workbench to access the server from a PC on the local network, and PHPMyAdmin cannot access the users table of the mysql database. I can't change user details at all through PHPMyAdmin, I get the error:
Error in processing request
Error code: 500
Error text: Internal Server Error (rejected)
It seems that the connection to server has been lost.
MySQL Workbench gives me this error:
Your connection attempt failed for user 'user' to the MySQL server at SERVERADDRESS:PORT:
Access denied for user 'user'#'SERVERADDRESS' (using password: YES)
I have checked that the server can accept connections from remote computers by adding bind-address=0.0.0.0 to the my.ini file. I have also checked to ensure that 3306 is allowed through the firewall.
Any ideas on what could be causing this issue?
ADyson and MrApnea pointed me in the right direction.
The problem was caused by my main database user having the host reset from % to localhost, I'm not sure how this happened or when. As the app was running locally, this was not affected, but all other access was denied (including MySQL workbench). My root user is set to local only for security.
To fix this, I connected to the server via RDP and logged in to the console as the root user. I then ran these commands to see the error:
use mysql;
select host, user from user;
This showed me that the main user account had "localhost" in the host. I ran this command to update this user:
update user set host='%' where user='username' and host='localhost'; flush privileges;

Remote access MySql via remote phpMyAdmin

I have a phpMyAdmin with MySQL on a linux remote machine to which I can connect with no problem with a browser.
But when I am trying to connect a DB in MySQL from a .NET program in my machine, I am getting an error message:
Authentication to host 'theIpNumber' for user 'newUserName' using method 'mysql_native_password' failed with message: Access denied for user 'newUserName'#'myMachineName' (using password: YES)
I tried to configured it like it is explained here: http://www.devside.net/wamp-server/accessing-mysql-or-phpmyadmin-from-outside
creating a new user with password in phpMyAdmin and changing the config.inc.php
Then in my app.config I have the connection string with:
connectionString="server=theIpNumber;UserId=newUserName;Password=newUserPassword;database=theDB"
But I am still getting the same error message when I run my program. Any idea how to solve this?
Finally I solved it adding in phpMyAdmin another user with the same name "newUserName" and password, and with the host value "%"

Unable to authenticate to mysql via vb.net

I have set up a MySQL server on Debian Linux and need to access a database on this server via vb.net. I found some help on Code Project to download the connector.net library and build a class to access the MySQL database. However when I try to connect I get the authentication error below when attempting to establish a connection with the mysql server:
Authentication to host '192.168.68.47' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'#'' (using password: YES)"} System.Exception
It seems that the library is appending the Windows workstation and domain to the user name and I am getting error. I tried using the root user with "#IPaddress" of the workstation, but it simply appended the workstation name and domain to this user. I also tried with another user besides root.
This is perfectly logic, because on your mysql server you need to Grant access to your host so it will be allowed to connect to, you can do it by following instructions in the following
Link
Also in the mysql configuration file, in your case : /etc/mysql/my.cnf you need to delete the line
bind-address = 127.0.0.1
This line will restrict all access from remote hosts, deleting it will allow access from remote hose which is what you want to do.
Hope this helps.

Cannot log to the local Mysql Server

I've installed XAMPP. I had put up security barriers but as time went by I forgot my credentials and could no longer access the MySQL server through phpMyAdmin. I keep having the following error trying to enter phpMyAdmin:
1045 Cannot log in to the MySQL server.
I've edited C:\xampp\phpMyAdmin\config.inc to change my passwords but I had no success afterwards. I've altered the bit:
Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'xxxxx' ;
$cfg['Servers'][$i]['password'] = 'yyyy' ;
I've run the MySQL resetroot batch file without success.
I've changed the default ports on my Apache and Mysql at the localhost a couple weeks ago and now I can't access mysql.exe.
Can't connect to MYSQL service on 'localhost'(10061).
How can I change the default localhost port?
Did you take a look here?
After installing a local server and trying to access phpMyAdmin, you could possibly encounter the error: #1045 Access Denied for user 'root'#'localhost' (using password: YES).
If root#localhost wasn't granted the necessary rights to access the database or you provided the wrong password, you will then encounter this error.
Following this tutorial will help guide you on bypassing this error, for any local host server using phpMyAdmin.