I am trying to create a sql user which has the sole role of performing the login procedure but I keep getting the same error: Access denied for user 'login'#'localhost' (using password: YES)
I created the user like this:
CREATE USER IF NOT EXISTS 'user'#'%' IDENTIFIED BY 'password';
GRANT EXECUTE ON procedure `table`.`login` TO 'user'#'%';
If I try to login via terminal or mysql workbench or use the mysql_real_connect() function in my C client, i always get the same error.
I solved it by reinstalling mariadb and using the following commands:
mysql_upgrade -u root -p
chown mysql:mysql /var/lib/mysql -R
systemctl enable mysqld
systemctl start mysqld
My system is arch linux, this can also be useful to better manage the installation of mysql or mariadb: https://wiki.archlinux.org/index.php/MySQL
Related
I am trying to install a Wordpress site on a local server (Ubuntu 16.04 in a docker container).
Xampp is installed and running, and I have created a database and a username with proper rights:
mysql -uroot -e "CREATE USER 'localuser'#'localhost' IDENTIFIED BY 'localpassword';";
mysql -uroot -e 'CREATE DATABASE 'localdatabase';';
mysql -uroot -e "GRANT ALL ON localdatabase.* TO 'localuser'#'localhost';";
I've also updated my wp-config.php file with the credentials above.
Still, when I try to install wordpress from there (I use wp-cli), I get the message "Error: Error establishing a database connection. This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down."
I've double checked the credentials, and xampp is indeed running, so what should I check next? Could this come from a config file that is missing something?
What hostname are you using in the wp-config? Also did the commands finish succesfully? For creating the db you used apostrophes instead of quotes. You can try the mysql client directly with mysql -u -p -h .
In wp-config.php, use 127.0.0.1 instead of localhost for the database hostname.
I have created my Maria DB Instance under Centos 7 using the the following command
[username#localhost]$ sudo yum install mariadb-server
System Enabled and Started with the following Commands
sudo systemctl enable mariadb
sudo systemctl start mariadb
I have secured the installation with the following command
sudo mysql_secure_installation
The Server was secured and invoked the mysql prompt using
mysql -u root -p
There is no problem. I am able to use this command to get into SQL Command
However when I am trying to load tables, i am getting the following error
ERROR 1045 [28000]: Access Denied for user 'root#'localhost' (using
password: NO)
Unable to load data. What could be the solution
Thanks
Sreeram
I am trying to install phpmyadmin + mariadb.
My PHP configure string has the following mysql flags
CONFIGURE_STRING="--prefix=/etc/php7 --enable-mysqlnd --with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd <and other flags>"
I installed mariadb with the following:
sudo apt-get install mariadb-client mariadb-server
sudo mysql_secure_installation
I can login with a password via
sudo mysql -u root -p
Then I installed phpmyadmin with
cd /var/www/html
git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git
mv phpmyadmin datastore #change name to datastore
When I open http://localhost/datastore I received the phpmyadmin login page; in attempt to login with root username and root password, i received the following error:
#2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).
AND
mysqli_real_connect(): (HY000/2002): No such file or directory.
I am using php7 on ubuntu 14.04.
I wish to be able to connect mariadb and phpmyadmin.
Got some directions from Git on how to solve the problem and these are my steps, I feel someone may encounter the same challenge.
In phpmyadmin copy config.sample.inc.php into config.inc.php
sudo cp config.sample.inc.php config.inc.php
Check MariaDB status with STATUS;
MariaDB [(none)]>STATUS; [ENTER]
Check Connection - if localhost via Unix Socket then copy unix socket value.
Go to config.inc.php and force the following
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';
Then change permission of config.inc.php in phpmyadmin
sudo chmod 0755 config.inc.php
Point your browser to phpmyadmin and login with your username and password.
Git link
Based on this link https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/blob/master/OpenStack_Folsom_Install_Guide_WebVersion.rst#openstack-folsom-install-guide , I tried running these scripts but it fails despite me setting the HOST_IP & EXT HOST_IP.
./keystone_basic.sh
./keystone_endpoints_basic.sh
Below is the error log received:-
-keystone:error:unrecognized arguments: service id of 18ea5916544429bed2c84af0303077
I have provide the information such as tenant_name, tenant_id and so on in a source file but it happens to be the script provided does not get recognized by the system. Below are the details of the OS I use.
I created VMs instead of using physical machines. Installed with Ubuntu 12.04 LTS.
Please advice on how to tackle this issue.
Thanks.
I had the same problem. I am using Ubuntu 12.04 LTS. After running:
keystone help user-create tenant id appears as follows:
Optional arguments:
...
--service_id <service-id>
Change --service-id to --service_id with a global replace
[Using command line]
# sed -i 's/--service-id/--service_id/g' /path/to/script.sh
restart keystone & It's database entries
mysql -u root -ppassword -e "drop database keystone"
mysql -u root -ppassword -e "create database keystone"
mysql -u root -ppassword -e "grant all privileges on keystone.* TO 'keystone'#'%' identified by 'password'"
mysql -u root -ppassword -e "grant all privileges on keystone.* TO 'keystone'#'localhost' identified by 'password'"
service keystone restart
keystone-manage db_sync
I just finished my website here I used ASP.net & MySQL.
I uploaded my website file all right.
But the problem is with my database. I create my database very will and I create all my tables but the problem is that I can't execute my stored procedure?
That is because i don't have the privileges to do this operation?
The error in phpMyAdmin is:
MySQL said:
#1227 - Access denied; you need the SUPER privilege for this operation
How can I fix this?
As MySQL root:
$ mysql -u root -p # ..or, if no password has been set..
$ mysql -u root
Run this command:
GRANT SUPER ON *.* TO user#localhost;
Further reading:
http://dev.mysql.com/doc/refman/5.1/en/grant.html