I'm in Laravel 5.8 don't know why I kept getting this error while loggin in
SQLSTATE[08006] [7] authentication method 10 not supported (SQL: select * from "users" where "uuid" = ****** limit 1)
I've tried various version of PostgresSQL from this link.
14
I started off with psql version 14.
Try logging in... error started to happen.
13
I uninstalled 14 and installed 13. Try again... error still persists.
9.6
I've tried uninstalling 13 and installed 9.6, and Try again... error still persists.
Each time, I downgrade my postgres version, I had to recreate the database and restore from a backup .sql file.
psql -U postgres -d dbname < dbname.sql
Is this something wrong with my Laravel/PHP/Postgres config that leads to this ?
I'm running out of ideas now ... 😢
pg_hba.conf
I couldn't find the file.
beta#Betas-MacBook-Pro boss-portal % psql -U postgres
Password for user postgres:
psql (9.6.24)
Type "help" for help.
postgres=#
postgres=#
postgres=# SHOW hba_file;
hba_file
------------------------------------------
/Library/PostgreSQL/9.6/data/pg_hba.conf
I went to check
/Library/PostgreSQL/9.6/data/pg_hba.conf
It's not there.
Related
In my local laravel environment I don't have any problems connecting.
But in production I'm getting this:
return "SQLSTATE[08006] [7] timeout expired (SQL: select * from "document")" in all routes that queries the bank..
DB_CONNECTION=pgsql
DB_HOST=**.**.**.**
DB_PORT=5432
DB_DATABASE=***********
DB_USERNAME=************
DB_PASSWORD=***************
Problem was in the cache, noticed the password change for an incorrect one and I clicked the new one again and gave p
php artisan config:cache
started working again
I'm having a lot of trouble with the PDO driver on this new installation
This is the error I get when trying to do any db operation triggered by laravel.
ext Illuminate\Database\QueryException: SQLSTATE[HY000] [2002] Permission denied (SQL: select * from `users` where `email` = ethan#gmail.com limit 1) in /var/www/html/mypath/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647
What's really strange here, is that PDO is enabled in php, and we're using the same credentials that php artisan migrate used to create the tables (so I know credentials, mysql socket are all working)
This is the PDO error from the stack
at PDO->__construct('mysql:unix_socket=/mnt/volume_sfo2_01/mysql_data/mysqld.sock;dbname=testdb1', 'dbuser1', 'mypassword', array(0, 2, 0, false, false))
in Connector.php line 68
Note that I did move the datadirectory of mysql and thus the change for the socket. This config works running the migrate, so what am I missing to get it working with the laravel PDO driver?
On ubuntu server 16 as well.
Nginx + php7.1
apparmor has been disabled additional just for this testing. Any ideas would be greatly appreciated.
I had similar issue on Laravel/Lumen 5.5 / CentOS7 / php71 / mariaDB
using the 'setenforce to test' strategy outlined in the solution here, Permissions Issue with Laravel on CentOS you might want to test for the influence of SElinux.
I was connecting via port 3306 and was able to resolve with insight from this problem report (https://bugzilla.redhat.com/show_bug.cgi?id=1245295) that lead me to
sudo setsebool httpd_can_network_connect_db 1
to make this change permenant you need to add -P switch
sudo setsebool -P httpd_can_network_connect_db 1
I'm trying to get Emoncms working on a shared hosting MediaTemple web server with verified prerequisites like mod_rewrite and LAMP server. I've created the database with user and password, configured the settings.php to the best of my ability.
/ - this is root
/emoncmsdata - Its 777 for data folders /phpfina & /phpfiwa & /phptimeseries
/httpdocs - this is my public folder
/httpdocs/emoncms - this is where the settings.php is and where modules are
But when I access santiapps.com/emoncms/ I get:
Can’t connect to database, please verify credentials/configuration in settings.php
Error message: Access denied for user ‘marskoko’#‘localhost’ (using password: NO).
I've put the database, user and password in the script. I've checked it and reset the password through their plesk.
I know the password for that user is correct because I can log in with the password just fine via terminal using mysql -u user -p pass and I get the MariaDB server and I can then enter USE Emoncms and the prompt reads that I'm connected to Emoncms.
The emoncms.log file created by the application is empty. I found a bunch of these in the web server error.log:
[Fri Sep 28 20:53:23.620729 2018] [proxy_fcgi:error] [pid 8219:tid 140039956670208] [client 83.139.179.122:35214] AH01071: Got error ‘Primary script unknown\n’
I've checked most of the posts in SO about this user password:NO issue and they all pertain to root, which I am not. I'm using another user called marskoko.
Access denied for user 'root'#'localhost' (using password: NO)?Unable to authenticate php/Mysql?
I can't stop or start the server, I've tried service mysql stop and I get:
Redirecting to /bin/systemctl stop mysql.service
Failed to stop mysql.service: Unit mysql.service not loaded.
4.a) I have recently been suggested to try:
service mysqld restart
But I get a similar error:
Redirecting to /bin/systemctl restart mysqld.service
Failed to restart mysqld.service: Unit not found.
But I know its running, otherwise I wouldn't be able to view my other databases.
I've created this php file:
<?php
$db = mysqli_connect("localhost","marskoko","myPasshasAdollarSign") or die("Failed to open connection to MySQL server.");
mysqli_select_db($db, "emoncms") or die("Unable to select database");
\>
and ran it and I get this:
Failed to open connection to MySQL server.
5.a) When I use mysqli_connect_error() I get:
Access denied for user 'emonuser'#'localhost' (using password: NO)
NOTE: The user is different because I wanted to make sure there wasn't some issue with the db or user, so I deleted the db and re-created it and changed the username. The db is still there and I can still access it via MariaDB using mysql command and the same password.
I tried this suggestion:
ps aux | grep mysql
and I get this:
mysql 7766 0.0 0.0 113200 1588 ? Ss Sep28 0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
mysql 8286 0.7 5.4 1906888 457400 ? Sl Sep28 5:12 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/activacorp.net.err --pid-file=activacorp.net.pid --socket=/var/lib/mysql/mysql.sock --port=3306
root 15702 0.0 0.0 112600 1068 pts/0 S+ 09:17 0:00 grep --color=auto mysql
I just tried logging into the db with the user/pass and I tried getting the table of users but got this:
MariaDB [emoncms]> select * from user;
ERROR 1146 (42S02): Table 'emoncms.user' doesn't exist
Then again I just checked all my databases and neither have the users table in it. They have other tables which Ive added and work with, but not the user table. Maybe phpmyadmin hides that, I dunno.
I dunno what else to try.
i think you can resolve this by the steps following
start/stop mysql by using service mysqld start/stop/restart instead of service mysql start/stop/restart
make sure you got the right password for mysql user - root, if no, please reset password by following step 3, else, skip step 3
edit mysql config file, usually /etc/my.cny, add skip-grant-tables under [mysqld], then restart mysql, now you can go into mysql without password, then reset password by using
update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';
flush privileges;
that is all, please check it
Ok I figured it out. Digging around the php I tried logging the $password variable in the index.php of emoncms and it logged blank whilst the username, database or other variables logged correctly. I ended up replacing the $password for the actual password in the mysqli line and it works now. So then I just replaced the $password "" for '' and it works now.
I need to change some calculations in a CRM but when I've receive the zip file I've unzip it in WAMP, it's use Symfony so I've done the install with composer and update. I'm a beginner with Symfony, Doctrine, ... so I've tried to do the next commands and I've receive some error message I don't know how to resolve it, I've research on the web all days and I've found nothing.
The commands
php bin/console doctrine:schema:update -f
or
php bin/console doctrine:database:create
I've these error messages :
[Doctrine\DBAL\Exception\ConnectionException]
An exception occured in driver: SQLSTATE[08006] [7] FATAL: role "stats_crm" does not exist
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[08006] [7] FATAL: role "stats_crm" does not exist
[PDOException]
SQLSTATE[08006] [7] FATAL: role "stats_crm" does not exist
I don't know what do you need for the informations about my environment, I'm using PhpStorm 2016.3.2, PostgreSQL 9.6, PgAdmin 3, phpPgAdmin 5.1, WAMP 3.0.6 and PHP 5.6.25
Thank you, sorry for my bad English and I don't know if you need more information.
The exception message tells you that doctrine can't login to your database host with username stats_crm, because that role does not exist.
To fix that exception, you have to find the right username that can get you in to the database server. Then, open your app/config/parameters.yml, find node named database_user, and update it accordingly (and database_password if necessary).
I've recently attempted to install mysql on my mac - osx lion.
I followed this guide - http://matthom.com/archive/2009/06/14/installing-mysql-mac-os-x
I can't seem to create a database from terminal, so I assume I've done something wrong in my installation.
When I try -
mysql> create database some_name;
I get -
ERROR 1044 (42000): Access denied for user ''#'localhost' to database 'some_name'
Also, I've tried to install phpmyadmin, but it won't let me log in. I get -
#2002 Cannot log in to the MySQL server
Any ideas? I'm trying to get away from using mamp.
To use MySQL via the console, you need to log in first:
$ mysql --user=root --password
Enter password:
mysql> CREATE DATABASE `some_database` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Query OK, 1 row affected (0.09 sec)
Also, when using PHPMyAdmin, you maybe need to manually set up the login method.
If you run this on mysql:
CREATE USER 'your_mac_user'#'localhost';
GRANT ALL ON *.* TO 'your_mac_user'#'localhost';
You can access mysql command-line with all privileges by simply writing "mysql" on terminal.