Joomla 4 cannot connect to the database Topic is solved
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sat Jan 10, 2015 2:13 pm
Joomla 4 cannot connect to the database
Hello,
I downloaded my new Joomla 4.26 and have tried to install this for a new installation.
I get to the end of the input fields and get the message,
Could not connect to the database Access denied for user 'my username'@'localhost' (using password: YES)
Should I be using the password instead of the username?
Thank you
John
I downloaded my new Joomla 4.26 and have tried to install this for a new installation.
I get to the end of the input fields and get the message,
Could not connect to the database Access denied for user 'my username'@'localhost' (using password: YES)
Should I be using the password instead of the username?
Thank you
John
Last edited by toivo on Tue Jan 24, 2023 11:57 pm, edited 1 time in total.
Reason: mod note: retitled
Reason: mod note: retitled
-
- Joomla! Champion
- Posts: 5110
- Joined: Tue Aug 23, 2005 1:56 pm
- Location: South coast, UK
- Contact:
Re: Joomla 4
You need a user name and a password unless you are hosting on your own pc.
http://www.gadsolutions.biz Electrical services
http://www.electrical-testing-safety.co.uk Testing services
http://www.electrical-testing-safety.co.uk Testing services
- Webdongle
- Joomla! Master
- Posts: 42534
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Joomla 4
If you are Hosting on your PC with wamp or similar then:
* The installation with create a database to the name you define in the database name field.
* The Host is ... localhost
* Database username ... root
* Database username password ... is left blank
If you are installing on a remote Host:
* You need to set up the database
* Set up a database user and password (unless the remote Host provides default ones).
* Fill in the fields in the installation according to your remote Host requirements.
* The installation with create a database to the name you define in the database name field.
* The Host is ... localhost
* Database username ... root
* Database username password ... is left blank
If you are installing on a remote Host:
* You need to set up the database
* Set up a database user and password (unless the remote Host provides default ones).
* Fill in the fields in the installation according to your remote Host requirements.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- AMurray
- Joomla! Exemplar
- Posts: 8540
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Joomla 4
Your database user and password are so the application can access the database. The details are those specified when you create the database in your webhosting account. (Ask your webhost about creating databases, or refer to their documentation).
The installation documentation instructs you to create a database. It's the second thing listed after checking your hosting meets the minimum technical requirements. (https://docs.joomla.org/J4.x:Installing_Joomla). Refer also to https://docs.joomla.org/J4.x:Hosting_Setup and https://docs.joomla.org/Special:MyLangu ... for_Joomla!
The installation documentation instructs you to create a database. It's the second thing listed after checking your hosting meets the minimum technical requirements. (https://docs.joomla.org/J4.x:Installing_Joomla). Refer also to https://docs.joomla.org/J4.x:Hosting_Setup and https://docs.joomla.org/Special:MyLangu ... for_Joomla!
Regards - A Murray
- Webdongle
- Joomla! Master
- Posts: 42534
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Joomla 4
On localhost Joomla's installation script will (usually) create the database
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sat Jan 10, 2015 2:13 pm
Re: Joomla 4 cannot connect to the database
Thank you for your excellent help.
I am using localhost on my own PC.
I am using xampp
I created a database and am using root with no password.
Regards
John
I am using localhost on my own PC.
I am using xampp
I created a database and am using root with no password.
Regards
John
- Webdongle
- Joomla! Master
- Posts: 42534
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Joomla 4 cannot connect to the database
When the php version, of the xampp you are using becomes out of date ... you might consider wamp
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sat Jan 10, 2015 2:13 pm
Re: Joomla 4 cannot connect to the database
I am not familiar with wamp.
Can I run both?
Can I run both?
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sat Jan 10, 2015 2:13 pm
Re: Joomla 4 cannot connect to the database
I just discovered weblinks thanks for that.
The following is a simulation of my entries which may demonstrate my error(s)
The right side column are similar to the names used in the failed install entry form. Perhaps someone can see where I may be going wrong.
Thank you
John
Enter the name of your Joomla Site mysite1
Enter the real name of your Super User. * Joe Smith
Set the username for your Super User account. * joesmith
Set the password for your Super User account. * 123456xyzokjM
Enter the email address of the website Super User. * [email protected]
Setup Database connection
Database Configuration
Select the database type. * MySQLi
Enter the host name, usually "localhost" or a name provided by your host. * Localhost
Either a username you created or a username provided by your host. * joesmith
Either a password you created or a password provided by your host. 1066andall
Enter the database name. * mydbase
Enter a table prefix or use the randomly generated one. * msi_
Connection Encryption * Default (server controlled)
The following is a simulation of my entries which may demonstrate my error(s)
The right side column are similar to the names used in the failed install entry form. Perhaps someone can see where I may be going wrong.
Thank you
John
Enter the name of your Joomla Site mysite1
Enter the real name of your Super User. * Joe Smith
Set the username for your Super User account. * joesmith
Set the password for your Super User account. * 123456xyzokjM
Enter the email address of the website Super User. * [email protected]
Setup Database connection
Database Configuration
Select the database type. * MySQLi
Enter the host name, usually "localhost" or a name provided by your host. * Localhost
Either a username you created or a username provided by your host. * joesmith
Either a password you created or a password provided by your host. 1066andall
Enter the database name. * mydbase
Enter a table prefix or use the randomly generated one. * msi_
Connection Encryption * Default (server controlled)
- Webdongle
- Joomla! Master
- Posts: 42534
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Joomla 4 cannot connect to the database
You can have both on your PC but you can only run one at a time.
* Wamp is installed just like any program on your PC https://www.wampserver.com/en/
* A folder is created in c:\your_wamp_folder\www for your site
* You can have many folders in c:\your_wamp_folder\www
* The virtualhost is reached in your browser localhost/foldername
* Wamp has the option of changing the php and/or database version on the fly. Just click the wamp tray icon hover over php (or database) and selrct the version you want running
* Newer versions of php and database can be added at a click of a button. Download the php and/or database version from https://wampserver.aviatechno.net/. Then right click and run as administrator to add it to your wamp.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sat Jan 10, 2015 2:13 pm
Re: Joomla 4 cannot connect to the database
I wondered if anyone could see my error in the entry above at Wed Jan 25, 2023 5:43 pm
Thank you
John
Thank you
John
- Webdongle
- Joomla! Master
- Posts: 42534
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Joomla 4 cannot connect to the database
The answer is in viewtopic.php?p=3682605#p3682459
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sat Jan 10, 2015 2:13 pm
Re: Joomla 4 cannot connect to the database
Many thanks Web Dongle,
Your right " Database username password is left blank"
I shall remember"
John
Your right " Database username password is left blank"
I shall remember"
John