MySQL Installer: Fails at creating user accounts - mysql

Currently trying to install and start a MySQL Server on my machine. I'm using the original, actual Installer/Wizard. After filling out all fields, setting a root passwords and also telling to create one user with the password on localhost, the application fails at the step "Creating user accounts".
The log says:
Attempting to Add New MySQL Users Authentication to host 'localhost'
for user 'root' using method 'mysql_native_password' failed with
message: Access denied for user 'root'#'localhost' (using password:
YES) Ended configuration step: Creating user accounts.
Interesting to note, I've done this on a testing device as well as on a fresh virtual machine. I've used different data and names actually, but with the same result >_< What could I be doing principally wrong?
Thanks in advance!
EDIT: Sort of solved... I re-downloaded the database alone and manually created users. Guess that's the better way when being about to learn SQL properly anyways.

That error blocks your installation - although your MySQL server is running - it keeps you from installing the samples and examples. However, if you ignore installing these samples and examples, you can start MySQL Workbench. Moreover, the root account will be available with the password you have set during the install procedure (using Windows). Just launch the Workbench.

I went back to the Accounts and Roles tab> "edit" on my user and my account said I needed a user name> reentered User name> save> next> rename MySQL> Execute== ran fine and finished install.
This was the easy way with all other updates for co-programs done already.

For anyone still having trouble, a simple solution for me was making sure my user names and passwords did not contain special characters such as \ > ~, and so on. Characters such as # and ! should work fine.

Related

Win Server 2019 - XAMPP - MYSQL Access denied for user ''#'localhost' (using password: NO)

I've been browsing the web and this site from other users which have had this issue and reading the comments to resolve however I've not had much luck and i'm going bonkers trying to work out the issue.
I have two servers - Win Server 2019 and both use XAMPP with Apache and MYSQL, the first server (1) has been running for over a year perfectly fine, however I'm setting up another server (2) to use as a test environment but with a fresh install of windows, xampp along with the Apache/MYSQL modules.
I'm using Invision Community application but I'm getting this upon the first page of installation:
MySQL Requirements
Fatal error: Uncaught mysqli_sql_exception: Access denied for user ''#'localhost' (using password: NO) in C:\xampp\htdocs\ips4.php:317 Stack trace: #0 C:\xampp\htdocs\ips4.php(317): mysqli->__construct('localhost') #1 C:\xampp\htdocs\ips4.php(340): my_mysqli->__construct('localhost') #2 {main} thrown in C:\xampp\htdocs\ips4.php on line 317
IPS4.php is just a file to state whether the server meets all the requirements for the application.
I've then compared MYSQL on (1) to the install on (2) and I've matched the details, given privileges to "root" user on all of the available databases within PHPMYADMIN, granted full grants and then reloaded them, restarted MYSQL and Apache and still same issue.
Normally the Invision software continues through to then request the database details, user details etc. but it hasn't got to that point yet.
The only differences I can see between both servers is (1) is running PHP 7.3.7 | Apache 2.4.39 | MySQL 5.0.12 and server (2) is running PHP 8.2.0 | Apache 2.4.54 | MySQL 8.2.0
I was hoping I would just install XAMPP and then transfer the files to install the software and then configure it to choose which DB/User and then install and get started but apparently not.
ROOT doesn't have a password on (2) but does on (1), when I add a password to (2), I'm then unable to access PHPMYADMIN and doesn't ask for a password to log in. I've spent a few hours today trying to resolve this but now I think I'd like some advice. Many thanks
Setting root password, then flushing privileges, granting full permissions on all databases, copying the mysql files from server (1) to server (2). uninstalling XAMPP and reinstalling.
I don't recall ever needing to do anything for permissions when I setup this software on server (1). I've also installed this software on a few linux servers but didn't enjoy using linux so I stopped using it.
EDIT: It seems it's using MariaDB 10.4.27
Set a password for root on (2).
Change the phpMyAdmin config.inc.php file,change
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
then phpMyAdmin will throw a login dialog and ask for a user/password
That should sort out the phpMyAdmin issue.
Big Note: You really should not be using the root account for any app/website access. Instead you should create a user account in MySQL/mariaDB one for each app/website that has access only to the database(s) required for that app/website. (Basic Security)
There was a user called "Any" hostname "%" which looks to be what was causing the issue, I gave it access to all databases (most likely wrong thing to do but it's internally accessed only - no access outside of our network).
This got rid of the error
Thanks for your help

Jawsdb on heroku, new database post migration, (Mysql2::Error: INSERT command denied to user..?)

Deployed a new version of our app on heroku and migrated over database from previous free jawsdb instance. However now every time user signs up gives
(Mysql2::Error: INSERT command denied to user <username for instance
what have i missed
migrated using a dump and re-import using mysql command line. eye balled exported data and it seems to be there (user emails etc)
all config vars look ok (DATABASE_URL is mysql2...)
i can login to the database via the url
I have not had to grant access or anything like that before, anyone come across this?
thanks
Ben
My guess is they disabled your INSERT grant because you have reached your max Storage Capacity for your plan.
To validate this is a permissions problem, log into a MySQL prompt with the user the app is running as, and enter this query:
SHOW GRANTS;
It probably list many, but no INSERT.
See this link. As explained in given link, jawsdb preliminary plan does not give you permission to add a new database. You are provided with one schema with some random name and you have to work with that only.
Check your migration
e.g. Make sure the database name matches.
For me, I got the same error as OP when trying to migrate my data. This was a fresh account with only a 50kb'ish database; nowhere close to the free-plan 5mb limit.
In my SQL export statement, my local database name is being used, however the remote MySQL (ie JawsDB) service auto-generates a db name, which will obviously not be the same. Simply used find-replace to change the database name to match remote; everything works.

kamailio fails to start because of invalid database credentials

I'm trying to try my hand out with Kamailio and Freeswitch.
I'm following the article listed here:
http://nil.uniza.sk/sip/kamailio-33-and-freeswitch-122-interconnection-voicemail-and-conference-services-debian-squeeze-60-64bit-tutorial
After adding the #!define statements, the article says to try to restart kamailio. When I do that, it fails with the error:
driver error: Access denied for user 'kamailio'#'localhost' (using password: YES)
I'm not sure which configuration file would contain the name of the default user that's used to log in to mysql. I did make the recommended changes to kamctlrc where you define the dbhost, dbname and the read write user etc. But none of those settings made reference to this user "kamailio". Not sure where to check.
Thanks.
Upon closer examination, I found that not only do I have an /etc/kamailio/kamailio.cfg file but /etc/kamailio/kamailio-advanced.cfg.
I made the changes the article suggested for kamailio.cfg in kamailio-advanced.cfg instead... and all is well. I was able to start the service again. I'm not sure if the database will work but at least I'm one step closer and now authentication is working.

phpmyadmin MySQL access error

I am having issues attempting to access a local phpmyadmin; and I'm sure some people may have run into this issue before.
The issue seems to be arising from previous installations and configurations.
I have IIS installed, which naturally takes up port 80. However I have successfully installed WAMP and attached it to port 8080 so as to avoid conflicts. I have installed phpmyadmin to run from both platforms, however neither is working.
Through IIS the browser throws a 403.14 - Forbidden error whilst through WAMP phpmyadmin returns the following message
MySQL said:
1045 - Access denied for user 'root'#'localhost' (using password: NO)
I believe that at least one of these errors is due to an earlier installation of Wordpress through WebMatrix (which has gone predominantly unused) which changed the MySQL (5.1) username and password defaults.
Googling the issue resulted in what seemed a promising source which claimed that one can edit a file called config.inc.php which contains the password details which are used by phpmyadmin to log into the local MySQL db. However, I couldn't find such a file (instead one named config.sample.inc.php which contained some similar information contained in the tutorial, but crucially without the relevant password field).
This isn't an absolutely critical issue as hosted dbs are ultimately necessary, but local versions nevertheless ease development.
in case you do not find config.inc.php then you can create one..
for details you may check this link..

symfony database access configuration problem

I just joined a web dev project that uses Symfony 1.4 on CentOS 5.4 with MySQL. The server is down. My first task in the project is to get it back up. I don't know a lot about Symfony.
The Apache server log says
Access denied for user 'root'#'localhost' (using password: NO)
From all I can tell, the database access configuration is stored in
/var/www/html/<project name>/config/databases.yml
and for some reason, there's also some config in
/var/www/html/<project name>/config/propel.ini
There was no password for user root in either of the files, so I thought adding it and restarting Apache would finx the issue. It does not, the error message stays the same. I might be looking at the wrong config files, but I can't find any other.
Any wild guesses how to fix this ?
Cheers,
ssc
OK, I know now what I did wrong: The password indeed has to be added to databases.yml, but whenever the configuration is changed, the symfony cache needs to be cleared by executing
./symfony cc
in the /var/www/html/<project name>/ folder.
You are right, the database config file is stored at /WEB/project/config/databases.yml
You can also try to run the configure:database command from the symfony command line tool.
php symfony configure:database "mysql:host=DBHOST;dbname=DBNAME" USER PASS
A getting started guide, and much more can be found at: http://www.symfony-project.org/jobeet/1_4/Propel/en/