Plesk fails on installation mysql - mysql

Trying to install plesk on an ec2 (currently 3 sites running) I have. From what i've read plesk will only work on a vanilla server (hoping this is not the case).
Installation crashes on the line:
Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-
sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql
After this the error is:
Trying to establish test connection... mysql: [Warning] World-writable config
file '/root/.my.cnf' is ignored.
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password:
NO) failed
One more attempt to connect
ERROR while trying to establish test connection. If you are installing Plesk
on an already configured MySQL server, you need to specify the administrator's
credentials to succeed with the installation. To do this, you need to create a
file - /root/.my.cnf with the 'client' section where you need to provide user
and its password ("user = $admin_name" and "password = $admin_pass"). After
installation is finished, the file /root/.my.cnf will be renamed to
/root/.my.cnf.bak
Check the error reason(see log file:
/var/log/plesk/install/plesk_17.8.11_installation.log), fix and try again
***** problem report *****
ERROR while trying to establish test connection. If you are installing Plesk on
an already configured MySQL server, you need to specify the administrator's
credentials to succeed with the installation. To do this, you need to create a
file - /root/.my.cnf with the 'client' section where you need to provide user
and its password ("user = $admin_name" and "password = $admin_pass"). After
installation is finished, the file /root/.my.cnf will be renamed to
/root/.my.cnf.bak
Check the error reason(see log file:
/var/log/plesk/install/plesk_17.8.11_installation.log), fix and try again
sh: 1: /etc/init.d/psa: not found
I have added the file /root/.my.cnf like so:
Client
User: xyz
Password: xyzxyz
But it still can't pick it up or use it (changed permissions over and over).
Has anyone been able to get past this error?
Cheers

Yes, it's possible to install Plesk on the server where mysql is already installed.
It's needed to create a file /root/.my.cnf with root access to mysql:
# cat /root/.my.cnf
[client]
user = root
password = root_password
But it's not recommended to install Plesk on the server where sites are already running because apache and nginx configuration files can be changed.

Related

Zabbix Server Connection to Database failed (ERROR Z3001 [1045]

I got a Problem with my Zabbix Server.
He was running the days ago, and then the dashboard shows up:
Zabbix Server is running --> Value NO
And: Zabbix server is not running the information displayed may not be current
I didnt change some configs in the past.
Then I looked in the Zabbix Server Log File in: /var/log/zabbix/zabbix_server.log
And the Error shows up:
15909:20201011:000020.063 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'#'localhost' (using password: NO)
15909:20201011:000020.063 database is down: reconnecting in 10 seconds
I already checked the Zabbix Config File in: /etc/zabbix/zabbix_server.conf
DBName, DBUser, DBPassword are all correct
Can someone tell me why the Error shows "(using password: NO)"?
Usually it means that no password was entered for the login?
PROBLEM SOLVED
Solution: I was adding an HP Switch IN THE PAST with the HP Enterprise Switch Template.
When the SNMP Discover was finished, there wore more than 2000 Items.
So it was a Stackoverflow :D
Have a nice day!
Please ensure you have no spaces before or after the PASSWORD line, and that it matches exactly with the following 2 files:
nano /etc/zabbix/zabbix_server.conf
### Option: DBPassword
# Database password.
# Comment this line if no password is used.
#
# Mandatory: no
# Default:
DBPassword=Ex4mmpleT3st!
#
#
AND:
nano /etc/zabbix/web/zabbix.conf.php
$DB['PASSWORD'] = 'Ex4mmpleT3st!';
Verify by checking the RESTARTING and checking the log:
service zabbix-server restart
cat /var/log/zabbix/zabbix_server.log

New Python 3. mySQL install user access denied

I have just installed mySQL on my Mac. The install appears to have been successful. I can successfully start and stop mySQL from the terminal command line. While in python I am attempting to create a connection and a cursor but am getting the following error message:
mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'#'localhost' (using password: NO)
My code to get to this point is very simple:
import mysql.connector
cnx = mysql.connector.connect(user = 'root')
the import statement executes without error but the command to create the connection gives the previously stated error. I have gone through all the internet questions I could find about this topic and none of them had a solution for me. Could this be a password issue. When I installed SQL I was given a password that during the SQL install process I was told I would be prompted for but I have not been prompted for the password. I tried to include the password as part of the connection configure parameters but that just gave the following error message:
cnx = mysql.connector.connect(user = 'root', password = 'supplied_pass')
mysql.connector.errors.DatabaseError: 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.
Any help on solving this would be appreciated.
I found the solution. After the SQL install it was necessary to perform a secure installation where I reset the password and eliminated the anonymous user. The password reset and anonymous user elimination occurred by following the prompts from the secure install. The original install was in the /usr/local/mysql/ directory. So at the terminal prompt I did a change directory to the /usr/local/mysql/ directory (cd /usr/local/mysql/bin/). Once in the new directory I typed this command at the terminal prompt: sudo ./mysql_secure_installation . At that point I just followed all the prompts to change the password and eliminate the anonymous user. Once that was complete I was able to successfully create a SQL connection and cursor.

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.

Error in opening phpmyadmin

I am using Windows 7 and had just installed WAMP in it. Then when i tried to open it in my browser i get the following error please help me asap..
"Error
MySQL said: Documentation
1045 - Access denied for user 'root'#'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server
rejected the connection. You should check the host, username and
password in your configuration and make sure that they correspond to
the information given by the administrator of the MySQL server. "
did you ever use phpmyadmin or mysql console to setup password?
If yes, go to step 6 and follow on
If no, open the file config.inc.php in folder C:/wamp/apps/phpmyadmin2.10.1 and find this line:
$cfg['Servers'][$i]['password'] = 'TakeOutAnythingInThisSingleQuote'; // MySQL password (only needed
Do as advised, then save the file, shut down and exit wamp. After restart wamp, start all over to setup password

Unable to connect from MySQL Workbench to server (System error 61)

MySQL error:
Failed to Connect to MySQL at 12.34.567.890:3306 with user jsdbadmin
Lost connection to MySQL server at 'reading initial communication packet', system error: 61
Using:
Plesk, SuSE vServer, fresh installation: completly new about an half year ago.
Software:
Trying to connect via MySQL Workbench, current version.
Hostname: 12.34.567.890 (modified for privacy), also tried with domain
Port: 3306
Username: My DB user name, as specified in Plesk when DB was created.
Password: *************
Default Schema: feeds
Tried TCP/IP, TC/IP over ssh.
Searched online:
These settings are not the problem:
#skip-networking
#bind-address = 127.0.0.1
Both already commented out.
Do you have a Firewall blocking the connection ?
You can test by telneting to the mysql port.
you also need to allow the ip/user combos that are allowed to connect
e.g.
to add a new user
GRANT ALL ON jsdbadmin.* TO remoteadmuser#'12.34.567.890' IDENTIFIED BY 'PASSWORD';
or
to grant access to a specific ip
update db set Host='12.34.567.890' where Db='yourdatabase';
update user set Host='12.34.567.890' where user='jsdbadmin';
Another possible (really annoying) error is that the server's public ssh keys have changed since your last login or that you've never logged in to that server using SSH and therefore you must manually approve them.
To solve this:
$ nano ~/.ssh/known_hosts
Remove old server keys from the file. Save & exit.
Connect to the server manually (ie. from terminal) and approve saving the new keys
After successful login from terminal, retry the mysql connection over ssh.
That worked for me...