Trouble setup mysql - authrization denied

Post Reply
stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Trouble setup mysql - authrization denied

Post by stuee » Fri Sep 29, 2017 10:24 am

Hi all.,
Im struggling to get this working on my server.
I tried an existing database and got the error, then tried a new complete database and user and still the same.
Ive tried
localhost and also 127.0.0.1

not sure why it wont connect.
MYSQL is on the same server as this installation.

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: Trouble setup mysql - authrization denied

Post by Luc » Fri Sep 29, 2017 10:47 am

Can you get access to your database with program phpMyAdmin with the same username and password you supplied in the main setup of meteotemplate?
Btw. localhost is ok for the server.
Image

stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Re: Trouble setup mysql - authrization denied

Post by stuee » Fri Sep 29, 2017 11:33 am

yes phpmyadmin works with the details

User avatar
wxthomson
Observer
Observer
Posts: 38
Joined: Sun Aug 20, 2017 5:21 pm
Location: Minnetonka Minnesota
Station model: Davis Pro 2
Software: Weather Display
Contact:

Re: Trouble setup mysql - authrization denied

Post by wxthomson » Sat Sep 30, 2017 1:20 am

I am also having trouble entering a mysql in MT.

i can get to it through the hosts page and through phpMyAdmin but not from MT

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Trouble setup mysql - authrization denied

Post by dmgould » Sat Sep 30, 2017 1:26 am

Are you entering the exact database user name you setup and the password for that specific database? Then you can test the connection on your main setup page. The host should also give the exact address for the database.
Dave G
Image

User avatar
Luc
Developer
Developer
Posts: 168
Joined: Mon Aug 21, 2017 6:40 am
Location: Paramaribo, Suriname
Station model: Davis Pro 2 (2x)
Software: WeeWX
Contact:

Re: Trouble setup mysql - authrization denied

Post by Luc » Sat Sep 30, 2017 4:42 am

Could you check if your database user has the right privileges? It should have read and write access (may be more, I'll have to check).
Image

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Trouble setup mysql - authrization denied

Post by Jachym » Sat Sep 30, 2017 9:18 am

There are usually 2 types of users, one has just read/write permissions and one can also create tables etc. You need the one with the full permissions.

User avatar
Fraggboy
Forecaster
Forecaster
Posts: 193
Joined: Wed Sep 27, 2017 2:45 pm
Location: Sunny California
Station model: Bloomsky II + Storm
Software: Bloomsky
Contact:

Re: Trouble setup mysql - authrization denied

Post by Fraggboy » Sat Sep 30, 2017 2:32 pm

You want to look for a Global Privileges checkbox.
Screen Shot 2017-09-30 at 7.31.20 AM.png
Screen Shot 2017-09-30 at 7.31.20 AM.png (121.42 KiB) Viewed 24425 times
Image

stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Re: Trouble setup mysql - authrization denied

Post by stuee » Sat Sep 30, 2017 9:55 pm

Everythings right with details.
Ive also tried using my wp database details and same problem?

stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Re: Trouble setup mysql - authrization denied

Post by stuee » Sat Sep 30, 2017 10:29 pm

This is my log file i just found. Seems TestMYSQL.php has an error line 5


[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1301
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: firstWeekday in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 2129
[29-Sep-2017 01:26:45 UTC] PHP Notice: Undefined variable: firstWeekday in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 2130
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1292
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: lang in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 1301
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: firstWeekday in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 2129
[29-Sep-2017 01:55:21 UTC] PHP Notice: Undefined variable: firstWeekday in /home13/cp891124/public_html/weather/meteo/install/setup.php on line 2130
[29-Sep-2017 06:37:06 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 06:38:33 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 06:39:01 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 06:39:12 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 06:43:16 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 06:50:47 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 07:07:07 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 12:32:20 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 12:32:30 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 12:32:39 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 12:32:59 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[29-Sep-2017 12:38:48 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/createConfig.php on line 35
[29-Sep-2017 22:39:31 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/createConfig.php on line 35

stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Re: Trouble setup mysql - authrization denied

Post by stuee » Sat Sep 30, 2017 10:40 pm

it looks like these are t he culprits and "USER" is the offender!

[30-Sep-2017 22:31:09 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/testMySQL.php on line 5
[30-Sep-2017 22:38:39 UTC] PHP Notice: Undefined index: user in /home13/cp891124/public_html/weather/meteo/install/createConfig.php on line 35

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Trouble setup mysql - authrization denied

Post by dmgould » Sat Sep 30, 2017 10:59 pm

Line 5 on testMySQL.php would mean the wrong MT user and return 'Unauthorized access' and then die when I look at my file. The file may have been changed some since I installed my MT. That would be a MT user problem not a database user problem and could cause you all kinds of issues.
Dave G
Image

stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Re: Trouble setup mysql - authrization denied

Post by stuee » Sat Sep 30, 2017 11:37 pm

fixed now.
I just wiped it all and uploaded a fresh install.
Put in same details and it worked? odd

stuee
Observer
Observer
Posts: 32
Joined: Fri Sep 29, 2017 6:54 am
Station model: OCwmr300
Software: WeatherDisplay

Re: Trouble setup mysql - authrization denied

Post by stuee » Sat Sep 30, 2017 11:37 pm

thanks for everyones input :)

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: Trouble setup mysql - authrization denied

Post by dmgould » Sat Sep 30, 2017 11:51 pm

Excellent news. Now things should be getting much easier for you.
Dave G
Image

MTQ
Newbie
Newbie
Posts: 7
Joined: Sun Dec 03, 2017 8:07 am
Station model: Davis Vantage Pro2
Software: WD API

Re: Trouble setup mysql - authrization denied

Post by MTQ » Sun Dec 03, 2017 5:20 pm

Hi,
I'm setting up MT for the first time. Now just with the setup.php...
And then trying to SAVE all the initial configuration it opens a new browser windows with the page "install/createConfig.php" and the text "Unauthorized access."

I've been re-writting all database credentials, server check, login with phpMyAdmin without any problem, etc.

I don't know anything else to do.

Anyone can help?
Thank you!

MTQ
Newbie
Newbie
Posts: 7
Joined: Sun Dec 03, 2017 8:07 am
Station model: Davis Vantage Pro2
Software: WD API

Re: Trouble setup mysql - authrization denied

Post by MTQ » Sun Dec 03, 2017 7:50 pm

Hi again,

I've tested with a simple php to connect and create a table inside this db and there is no problem at all...
I've changed several times the Username and Pass for that table, and it does not work with anyone.

Thank you!

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Trouble setup mysql - authrization denied

Post by Jachym » Sun Dec 03, 2017 8:45 pm

If you have the setup opened it should ALWAYS log you in. If it does not (shows unauthorized) it means your server is not properly handling sessions. This is something to check. Are you using external hosting or yours? Is it a free webhosting?

MTQ
Newbie
Newbie
Posts: 7
Joined: Sun Dec 03, 2017 8:07 am
Station model: Davis Vantage Pro2
Software: WD API

Re: Trouble setup mysql - authrization denied

Post by MTQ » Sun Dec 03, 2017 8:52 pm

Hi,

Is an external hosting where I've my domain and website.
Is there anything I can check about session handling?

I've been able to check the database and save the configuration. But event is saved and when I com back to the config all my config is there, if I open /template on my browser it shows the default template without even my station name, it just says "Meteotemplate".

Thank you!

User avatar
Jachym
Site Admin
Site Admin
Posts: 1686
Joined: Fri Aug 18, 2017 10:12 pm
Location: Brno, Czech Republic
Station model: WH1080
Software: Meteobridge
Contact:

Re: Trouble setup mysql - authrization denied

Post by Jachym » Sun Dec 03, 2017 8:55 pm

Was the config.php created on your server?

If yes, then it shows Meteotemplate because you didnt change the header title

Post Reply