I don't know how to create a database into Parallels Plesk Panel, so I tried it going to the PhpMyAdmin creating the database and modifying the admin user password from there, but now the system is showing me the next error:
ERROR: PleskFatalException
Unable to connect to database: saved admin password is incorrect.
0: common_func.php3:150
psaerror(string 'Unable to connect to database: saved admin password is incorrect.')
1: auth.php3:107
ERROR: PleskFatalException
Unable to connect to database: saved admin password is incorrect.
0: common_func.php3:150
psaerror(string 'Unable to connect to database: saved admin password is incorrect.')
1: auth.php3:107
What can I do to fix it?
Try to connect to psa database:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
In case you cannot connect, try to update admin user for mysql with this password. After that Plesk should be able to connect with this database.
I also add this problem, for me the above solution didnt work. it appears plesk has been evolving it's password protection (e.g. .psa.shadow is now aes-cbc encrypted)
this kb article worked for me - i'm using plesk 11.09
http://kb.parallels.com/112492
I got myself into this situation when i got a cloud vm instance where i couldnt log into mysql. so i mysqld_safe and updated the admin password to what it was supposed to be, which meant i could log in but I also broke plesk. this kb got plesk back on its feet again
One thing I found; after following these steps I am not able to login to the plesk 'admin' user on the command line, even with the password i specified in the env variable ! so before resetting the admin password as per this kb article, create another mysql user with all privileges. then use the new user so you dont have the problem of sharing a user with plesk
as to why this happens i dont know, i'm interested if someone does. what appears to be happening is that the ch_admin_passwd of psa starts mysql with security disabled, does some operation on the password (obfuscate?, encrypt?, add salt?) and sets that password for the admin user. whatever that interim operation means that while plesk can log into mysql as admin because it's consistent with itself, the cleartext version of the password specified to ch_admin_passwd does not work on the command line with mysql
Related
So I have PostgreSQL installed fine, and am trying to run the createdb 'test' command in the Terminal. I am on my normal user account. When trying to create the database, I am asked for a password twice, then I get the error message createdb: error: could not connect to database template1: FATAL: password authentication failed for user "sethmarks". Does this mean I entered the incorrect password or that I do not have permission to create databases under this user? I am getting confused and frustrated by this and would like to know what is going on. I am entering the password I use for the OS user I am currently logged into.
I am able to create a database when I do sudo su - postgres and then create it when I am doing it under the Postgres user, but that is not going to work with my program. Can anybody help me figure this out?
I included a picture of the terminal to show the process and what happens when attempting to create a new db. Thank you very much.
It depends on the privileges that have been granted to your user account and which privileges have been granted to PUBLIC.
You can query some privileges with psql \du meta command for the current user.
In your case you need at least to run as superuser:
grant connect on database template1 to sethmarks;
I don't exactly why password is requested twice: this is not caused by wrong password: I have the same behaviour but I need to give the database user password not the OS user password.
i am developing a windows application that uses a database "MSSQL Server" installed in my pc.
the application has two interface : manager and user
the user will be located in different countries which is mean different network.
the network that my PC is connected to has a high level of security and my PC has local IP address.
what is the best and secure way to share the database and let the users located in network X access my database?
for example: should i use online database or azure or share point or DNS?
if any one has an experience in this kind of connection please advice.
Here is the solution for that!
Go to MySQL server
Type the following code to grant access for other pc
mysql > grant all privileges on . to 'root'#'%' identified by 'root_password'; mysql> flush privileges;
Replace ‘%’ with the IP you want to grant access for!
This worked for me!
In that case just use localhost and follow this steps:
mysql -u user -p
or
mysql -hlocalhost -u user -p
If you cannot login with this, you must find out what usernames (user#host) exist in the MySQL Server localy. Here is what you do:
Step 01) Startup mysql so that no passwords are require no passwords and denies TCP/IP connections
service mysql restart --skip-grant-tables --skip-networking
Keep in mind that standard SQL for adding users, granting and revoking privs are disabled.
Step 02) Show users and hosts
select concat(''',user,'''#''',host,'''') userhost,password from mysql.user;
Step 03) Check your password to make sure it works
select user,host from mysql.user where password=password('YourMySQLPassword');
If your password produces no output for this query, you have a bad password.
If your password produces output for this query, look at the users and hosts. If your host value is '%', your should be able to connect from anywhere. If your host is 'localhost', you should be able to connect locally.
Make user you have 'root'#'localhost' defined.
Once you have done what is needed, just restart mysql normally
service mysql restart
If you are able to connect successfully on the macbook, run this query:
SELECT USER(),CURRENT_USER();
USER() reports how you attempted to authenticate in MySQL
CURRENT_USER() reports how you were allowed to authenticate in MySQL
Let us know what happens !!!
Login to the remote server and repeat Step 1-3
See if any user allows remote access (i.e, host in mysql.user is '%'). If you do not, then add 'user'#'%' to mysql.user.
I am trying to set up my WordPress project, and I am using WampServer. In phpMyAdmin, I simply tried to create a new database, but I got this error : #1044 - Access denied for user ''#'localhost' to database 'wp'. I never had this problem before.
In WAMPServer when you run phpMyAdmin you are shown a login screen.
By default :
The Username = root
And the Password is not set so you should not enter a password in the Password field.
Then press the Go button to login.
This will log you in as the root SuperUser, who can do anything on a MySQL Server.
If you leave the Username blank, like it appears you did, you are logged in as an annonymous user with no rights to do anything much at all.
Login to the web console for phpMyAdmin and navigate to the wp database
Click on the SQL tab and paste this code:
grant all privileges on wp.* to user#localhost identified by 'PASSWORD';
flush privileges;
\q
Change the user's credentials to match your config, then
Click Ok and it should work!
You can read more about GRANT's syntax at MySQL's site.
Hope it helps!
I created an admin user with password in pgadmin4:
CREATE USER admin WITH
LOGIN
SUPERUSER
CREATEDB
CREATEROLE
INHERIT
REPLICATION
CONNECTION LIMIT -1
PASSWORD 'xxxxxx';
But I can login to the respective server with the admin user and any wrong password.
I used psql command line to check if the user has been created, and it is.
# SELECT usename FROM pg_user;
usename
------------
postgres
xxxxxxxxxxx
admin
(3 rows)
I checked if I can login with the admin user and a wrong password through psql command line, and it worked...
Am I doing something wrong?
Pgadmin4 v1.1
Postgresql v9.6
Same problem on Centos 6.8 and macOSX 19.12.1
This is speculation, but it's educated speculation, as I encountered a similar issue.
If your pg_hba.conf file, I am pretty confident you have the admin user set up as "trust." This pretty much means it can log in from anywhere you specified, without a password.
If you change this to "md5," it should resolve the issue.
# TYPE DATABASE USER ADDRESS METHOD
host all admin <whatever> trust
change to
host all admin <whatever> md5
Of course some of these fields may be different, depending on how you have the server set up, but you get the idea.
I was trying to update one of the data source of my forena configuration. I first update the uri address. After I clicked Updated the forena module broke. I'm sure the problem is that one of the Data Source (the one I updated) can't connect to the database because I didn't update the password. But now, eveytime I click in Configure in my Data source I get the following error:
Fatal error: Call to a member function setAttribute() on a non-object
in
/opt/bitnami/apps/drupal/htdocs/sites/all/modules/forena/plugins/FrxPDO.inc
on line 63
Becuase of this error I can't correct the password.
The drupal log shows the following:
SQLSTATE[HY000] [1045] Access denied for user
'bitnami'#'54.204.20.212' (using password: YES)
I'm thinking there most be a config file somewhere in the htdocs directory but I can't find it.
Can somebody guide on how to fix this?
Thanks,
Claudia
Bitnami developer here,
It seems that bitnami user is trying to access to the dtabase. By default, bitnami user has not privileges to access to the drupal database.
Check in installdir/apps/drupal/htdocs/sites/default/settings.php
the user and the password of the drupal database. You could try execute the action with these parameters. By default, your database name should be bitnami_drupal, and your user bn_drupal.
You also can change the privileges for bitnami user:
$ /installdir/mysql/bin/mysql -u root -p
grant all privileges on bitnami_drupal.* TO 'bitnami'#'localhost' identified by 'not_easy_password'
If you want to create a new database, please follow this link:
https://wiki.bitnami.com/Components/MySQL#How_to_create_a_database_for_a_custom_application.3f
I hope it helps
David