error 1045

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

error 1045

Postby lavalamp213 » 08. June 2021 11:52

Hi-
I am trying to create an offline version of my phpbb forum.

I have set up XAMPP, copied my existing phpbb files and folders to the htdocs in a folder called "public_html"

I uploaded my phpbb data (made from phpmyadmin at the host server).

I can see the file (public_html) in localhost, however, when I click on it I get this error:

General Error
SQL ERROR [ mysqli ]

Access denied for user 'cultofta_ss_d8d1'@'localhost' (using password: YES) [1045]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.


I realise this is a problem with my credentials. Probably.

Did I mess up on the install by not initially using my forum credentials?
I just set it up with a new username and password.
I went back and tried to change it but nothing really worked.

Also, I installed v. 7.4.19
My board in currently running php v. 5.6.40
I already know that my board is not compatible with v7 php (this is why I am working on upgrading it right now)

I appreciate any help or advice you can give.
Thanks!

BTW- If it would just be easier for me to start fresh, doing it correctly, I have no problem with that. As long as I know what mistakes I might have made this first time.
lavalamp213
 
Posts: 7
Joined: 08. June 2021 11:41
XAMPP version: 7.4.19
Operating System: MocOSX

Re: error 1045

Postby Altrea » 08. June 2021 13:27

Hi,

Did you create the user cultofta_ss_d8d1 for host localhost in MariaDB?
Either the user is not present or does not have sufficient privileges.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error 1045

Postby lavalamp213 » 08. June 2021 14:04

Maria DB? Isn't that the same as XAMPP?

I just followed the prompts after install to create a user and password. I also checked to have the database the same name as the user.
I also gave it the global privileges.

There are a few places I think I might have screwed the pooch, and I am tempted, really planning to start from scratch rather than keep trying to fix my errors.
Before I do that it would be helpful to know a couple of things:

1. When I create a new user and database, do the username and password need to be the same as the website I am copying to the htdocs file? This error seems to be related to credentials and I think I may have started with the wrong ones.

2. Do I need to have that database selected as I copy the phpbb files and folders from my live site over?

3. When I upload the phpbb data (the .sql.gz file) do I need to have mysql selected? (I may have accidentally uploaded that file to the main database )

4. My phpbb board (the one I copied over) was running on an old version of php, v 5.6.40. I had downloaded v. 7.4.19 - could that have caused a conflict?

5. The instructions I have say to leave the "Host Name" as default "Any Host." I did that but then as I was tweaking things to make it work I changed it it to localhost. what would be correct?

Sorry for so many questions. I see from googling around that this 1045 error message is a problem for a lot of people. I'm gathering that the issue is about being really accurate with the set up.

Thank you so much for your help.
lavalamp213
 
Posts: 7
Joined: 08. June 2021 11:41
XAMPP version: 7.4.19
Operating System: MocOSX

Re: error 1045

Postby Altrea » 08. June 2021 18:17

lavalamp213 wrote:Maria DB? Isn't that the same as XAMPP?

XAMPP is the name of the full stack. MariaDB is one single component in it.

lavalamp213 wrote:I just followed the prompts after install to create a user and password. I also checked to have the database the same name as the user.
I also gave it the global privileges.

Well, okay. But did this user and database match the configuration of your application?

lavalamp213 wrote:1. When I create a new user and database, do the username and password need to be the same as the website I am copying to the htdocs file? This error seems to be related to credentials and I think I may have started with the wrong ones.

It is not related to the name or url of your application, but on the configured credentials your application uses.

lavalamp213 wrote:2. Do I need to have that database selected as I copy the phpbb files and folders from my live site over?

No. The database information is needed at the time you (or someone else) requests the web application, so commonly the first time after you copied over the asset files and imported the database data. Or if you freshly install a webapplication at the time you request the web application installation.

lavalamp213 wrote:3. When I upload the phpbb data (the .sql.gz file) do I need to have mysql selected? (I may have accidentally uploaded that file to the main database )

I don't know if i understand the question correct.
It depends on the contents of the backup what you need to do exactly. Most commonly a backup will only contain structure and data of the database, no statement to create the statement itself. In this case you need to select the database and import the sql file from there.

lavalamp213 wrote:4. My phpbb board (the one I copied over) was running on an old version of php, v 5.6.40. I had downloaded v. 7.4.19 - could that have caused a conflict?

Yes. You need to double check if the exact version of phpbb you are using (and all of its modules/plugins) are able to run on PHP 7.4.19.

lavalamp213 wrote:5. The instructions I have say to leave the "Host Name" as default "Any Host." I did that but then as I was tweaking things to make it work I changed it it to localhost. what would be correct?

"Any Host" is only needed if you for example want to access the database from a different computer. In most cases localhost is correct and will produce less problems. Commonly only the webapplication (or phpmyadmin) will access the database, and both of them should come from localhost, because the webapplication and phpmyadmin scripts are interpreted on the same system as your MariaDB/MySQL is running on.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error 1045

Postby lavalamp213 » 08. June 2021 19:22

Thank you! ❤ imma have another go at this tomorrow.
lavalamp213
 
Posts: 7
Joined: 08. June 2021 11:41
XAMPP version: 7.4.19
Operating System: MocOSX

Re: error 1045/ 1146

Postby lavalamp213 » 09. June 2021 12:32

PLEASE SEE NEXT POST!!


I did a fresh install this morning and used the information from my config.php to set up my database name, username and password.

It APPEARS that has worked except now I am getting another error message that seems to be regarding the data backup:

General Error
SQL ERROR [ mysqli ]

Table 'cultofta_ss_dbname8d1.ss_dbprefixusers' doesn't exist [1146]

An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.


When I look at the tables that imported, it looks like only half of them did. There are 90 tables in my data backup and only the first 45 loaded.

Initially, I tried importing the table that the error message named, but it did not work. I tried importing the whole thing again, did not work.

Each time I got this message after the import attempt:

Static analysis:
1 errors were found during analysis.

1. Missing expression. (near "ON" at position 25)

SQL query: Copy  Edit
SET FOREIGN_KEY_CHECKS = ON;
MySQL said: 
#2006 - MySQL server has gone away


is there somewhere in the php.ini that limits the number of tables or something? Or what could be preventing my whole data backup from loading?
lavalamp213
 
Posts: 7
Joined: 08. June 2021 11:41
XAMPP version: 7.4.19
Operating System: MocOSX

Re: error 1045

Postby lavalamp213 » 09. June 2021 13:48

I dropped the database and did a fresh import of the data from my host server phpmyadmin

That seems to have worked better but now I am back to the original problem of error 1049.

I just can seem to login.

I set up my user account using the database name, user name and password from the config.php.

I just can figure out what the issue is.
lavalamp213
 
Posts: 7
Joined: 08. June 2021 11:41
XAMPP version: 7.4.19
Operating System: MocOSX

Re: error 1045

Postby Altrea » 09. June 2021 13:58

Then lets simplyfy the environment.
What happens if you change the phpbb database user in your phpbb configuration from cultofta_ss_d8d1 to root
and the password to empty password?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error 1045

Postby lavalamp213 » 09. June 2021 14:28

Altrea wrote:Then lets simplyfy the environment.
What happens if you change the phpbb database user in your phpbb configuration from cultofta_ss_d8d1 to root
and the password to empty password?


I changed it in the config.php

restarted xampp, same message.
General Error
SQL ERROR [ mysqli ]

Unknown database 'cultofta_ss_dbn' [1049]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.


:(

$dbname = 'cultofta_ss_dbn';
$dbuser = 'root';
$dbpasswd = '';
lavalamp213
 
Posts: 7
Joined: 08. June 2021 11:41
XAMPP version: 7.4.19
Operating System: MocOSX

Re: error 1045

Postby Altrea » 09. June 2021 14:49

Wait!

"Unknown database" (error 1049) is a completely different error than your initial error "Access denied for user" (error 1045)

That error means the database cultofta_ss_dbn does not exist.
So check that the database is created having the correct name
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: error 1045

Postby lavalamp213 » 09. June 2021 15:13

I'm all over the place with this.

To answer your question, there is/was a database with that name.

When I try importing the data backup from my board, only half the tables will import (45 out of 90)

I was advised to get my data backup directly from my host server via phpmyadmin.

I tried that, still didn't work.

I have been following instructions (and advice) I got from the phpbb Support forum. A lot of it was conflicting and contridictory advice.

I wonder if you have a set of install/set up instructions I could follow. Just try another clean set up and see what happens.
Is that something you could help me with?
lavalamp213
 
Posts: 7
Joined: 08. June 2021 11:41
XAMPP version: 7.4.19
Operating System: MocOSX

Re: error 1045

Postby Altrea » 09. June 2021 20:30

lavalamp213 wrote:To answer your question, there is/was a database with that name.

There was. Currently there isn't. And we cannot solve a problem from a past. Now the problem is that the database is not existent and this needs to get solved first.

lavalamp213 wrote:When I try importing the data backup from my board, only half the tables will import (45 out of 90)

There are multiple reasons why this can happen. Most commonly timeout issues.

lavalamp213 wrote:I was advised to get my data backup directly from my host server via phpmyadmin.

I tried that, still didn't work.

What exactly didn't work? A phpmyadmin backup is a valid way to do a full database backup.
This backup needs to be complete for sure.

lavalamp213 wrote:I have been following instructions (and advice) I got from the phpbb Support forum. A lot of it was conflicting and contridictory advice.

Well, it would have been helpful if you show us the specific thread in the phpbb support board. Maybe there are information which can help us identifying the error or helping you better.
If you tell us what is conflicting and contridictory from your point of view maybe we can help to give you some explaination.

lavalamp213 wrote:I wonder if you have a set of install/set up instructions I could follow. Just try another clean set up and see what happens.
Is that something you could help me with?

There is not much to tell. Do a phpmyadmin backup, create your database user and database database locally and import your backup to the new database.
If the import runs in timeout issue, perform the import with help of the Commandline Interface (CLI)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 6 guests