Re: [GTALUG] [OT] mySQL help SOLVED

2019-06-04 Thread nick via talk


On 2019-06-04 4:00 p.m., Stephen via talk wrote:
> Thank you to all who posted offers/attempts of help. I have been looking at 
> this part time over a few days.
> 
> It turns out my problem was in my PHP code :(
> 
> I went through every bit of my mysql system. Everything was fine. I did learn 
> a few things :)
> 
> But, the new upgraded version required a medium strength password and that 
> includes a special character. I made what I thought was a simple change in my 
> web sites data.php file.
> 
> But, I put my PHP variables between double quotes. That caused the special 
> character in my password to expand and thereby become incorrect. :(
> 
> In future I will use single quotes for my passwords.
> 

Double quotes versus single quotes is one of the biggest headaches in PHP. It's 
caused me a lot of headaches over even my limited web development experience.
Granted it's still not as bad as string being considered the default promoted
type in PHP which is even more annoying.

Glad to see it working :),

Nick
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] [OT] mySQL help SOLVED

2019-06-04 Thread Stephen via talk
Thank you to all who posted offers/attempts of help. I have been looking 
at this part time over a few days.


It turns out my problem was in my PHP code :(

I went through every bit of my mysql system. Everything was fine. I did 
learn a few things :)


But, the new upgraded version required a medium strength password and 
that includes a special character. I made what I thought was a simple 
change in my web sites data.php file.


But, I put my PHP variables between double quotes. That caused the 
special character in my password to expand and thereby become incorrect. :(


In future I will use single quotes for my passwords.

--
Stephen

On 2019-05-28 7:50 p.m., Stephen via talk wrote:

I am not on any lists for mysql. So I thought that I would ask her,

Suggestions for a help list for mysql are most welcome.

I have a LAMP for web site development and rarely need to touch the 
database admin stuff.


It has been years. I am creating a new site with database but I can't 
get the user to have privileges.


Can anyone spot what is wrong?

So I connect to the server with:
stephen@Avalon:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.?? Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.7.26-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights 
reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.


mysql>
===
I create grants
mysql> grant all on rois3324_stephen.*?? to 
"rois3324_stephen"@"localhost" with grant option;

Query OK, 0 rows affected (0.00 sec)
===
I try to see grants
mysql> "rois3324_stephen"@"localhost"
->

It looks like no grants were created. And I get a confirming error from 
PHP.


Can anyone see what is wrong?

Thank you!



---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] [OT] mySQL help

2019-05-29 Thread Jason Shaw via talk
On Tue, May 28, 2019 at 7:50 PM Stephen via talk  wrote:

> Can anyone spot what is wrong?
>
> So I connect to the server with:
> stephen@Avalon:~$ mysql -u root -p
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 11
> Server version: 5.7.26-0ubuntu0.18.04.1 (Ubuntu)
>
> Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights
> reserved.
>
> Oracle is a registered trademark of Oracle Corporation and/or its
> affiliates. Other names may be trademarks of their respective
> owners.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> mysql>
> ===
> I create grants
> mysql> grant all on rois3324_stephen.*  to
> "rois3324_stephen"@"localhost" with grant option;
> Query OK, 0 rows affected (0.00 sec)
> ===
> I try to see grants
> mysql> "rois3324_stephen"@"localhost"
> ->
>
> It looks like no grants were created. And I get a confirming error from
> PHP.
>
> Can anyone see what is wrong?
>
> Thank you!
> --
> Stephen
> ---
> Talk Mailing List
> talk@gtalug.org
> https://gtalug.org/mailman/listinfo/talk
>

Hey Stephen, you are running mysql 5.7, so I'm going to link some docs and
walk through what I'd do in this situation.  I apologize if you know this
stuff, or have already tried any of it as I'm operating off the set of
information you've provided. :)

First off, I'd run
SHOW GRANTS FOR "rois3324_stephen"@"localhost";
to ensure that the grants you want match the grants it displays.
https://dev.mysql.com/doc/refman/5.7/en/show-grants.html

Second, I'd run
SHOW CREATE USER "rois3324_stephen"@"localhost"\G
to further make sure that things look as they should.
https://dev.mysql.com/doc/refman/5.7/en/show-create-user.html

Next up is to run FLUSH PRIVILEGES;
To ensure that what you've just written to disk is loaded into a freshly
cleared cache.
https://dev.mysql.com/doc/refman/5.7/en/flush.html#flush-privileges

I'm unsure of how GRANT works if CREATE USER hasn't already been executed,
but to me, this appears to be a possible case. The above steps should
hopefully reveal any discrepancies.  It's also worth remembering that
'localhost' and 127.0.0.1 are not necessarily treated identically,
depending on your mysql configuration and /etc/hosts files.
https://dev.mysql.com/doc/refman/5.7/en/grant.html
https://stackoverflow.com/questions/19712307/mysql-localhost-127-0-0-1

If you can sanitize the output from the above commands so they don't
contain personal information and send them along, we can help troubleshoot
further, but this is where I'd get started.
-jason
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] [OT] mySQL help

2019-05-29 Thread William Witteman via talk
I usually have to specify a database.
use dbname
grant all on dbname...

I have not ever used phpmyadmin, but I am cautious about it, because
malicious scripts are searching my websites for it all day, every day for
at least the last 15 years.

On Wed, May 29, 2019, 01:01 Kevin Cozens via talk  wrote:

> On 2019-05-28 7:50 p.m., Stephen via talk wrote:
> > It has been years. I am creating a new site with database but I can't
> get
> > the user to have privileges.
> >
> > Can anyone spot what is wrong?
>
> You may find it useful to install phpMyAdmin. It simplifies administration
> of MySQL.
>
> --
> Cheers!
>
> Kevin.
>
> http://www.ve3syb.ca/   | "Nerds make the shiny things that
> https://www.patreon.com/KevinCozens | distract the mouth-breathers, and
>  | that's why we're powerful"
> Owner of Elecraft K2 #2172  |
> #include  | --Chris Hardwick
> ---
> Talk Mailing List
> talk@gtalug.org
> https://gtalug.org/mailman/listinfo/talk
>
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] [OT] mySQL help

2019-05-28 Thread ac via talk
On Wed, 29 May 2019 01:01:23 -0400
Kevin Cozens via talk  wrote:
> On 2019-05-28 7:50 p.m., Stephen via talk wrote:
> > It has been years. I am creating a new site with database but I
> > can't get the user to have privileges.
> > Can anyone spot what is wrong?  
> 
> You may find it useful to install phpMyAdmin. It simplifies
> administration of MySQL.
> 
depending on mysql version, etc I have found that with or without phpMyAdmin, 
one may still have to do FLUSH PRIVILEGES;
or mysqladmin flush-privileges or mysqladmin reload etc
afaik maria (and later/newer? versions of mysql?) automagically flushes
and reloads grant tables, when not using insert/update/del but older
vers of mysql may not...(of course if you are mod grant tables without
using grant you have to flush anyway)

hth

Andre
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] [OT] mySQL help

2019-05-28 Thread Kevin Cozens via talk

On 2019-05-28 7:50 p.m., Stephen via talk wrote:
It has been years. I am creating a new site with database but I can't get 
the user to have privileges.


Can anyone spot what is wrong?


You may find it useful to install phpMyAdmin. It simplifies administration 
of MySQL.


--
Cheers!

Kevin.

http://www.ve3syb.ca/   | "Nerds make the shiny things that
https://www.patreon.com/KevinCozens | distract the mouth-breathers, and
| that's why we're powerful"
Owner of Elecraft K2 #2172  |
#include  | --Chris Hardwick
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] [OT] mySQL help

2019-05-28 Thread ac via talk
On Tue, 28 May 2019 19:50:51 -0400
Stephen via talk  wrote:

> mysql>  
> ===
> I create grants
> mysql> grant all on rois3324_stephen.*  to   
> "rois3324_stephen"@"localhost" with grant option;
> Query OK, 0 rows affected (0.00 sec)
> ===
> I try to see grants
> mysql> "rois3324_stephen"@"localhost"
> ->  
> 
maybe: FLUSH PRIVILEGES;

hth

Andre
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] [OT] mySQL help

2019-05-28 Thread nick via talk


On 2019-05-28 7:50 p.m., Stephen via talk wrote:
> I am not on any lists for mysql. So I thought that I would ask her,
> 
> Suggestions for a help list for mysql are most welcome.
> 
> I have a LAMP for web site development and rarely need to touch the database 
> admin stuff.
> 
> It has been years. I am creating a new site with database but I can't get the 
> user to have privileges.
> 
> Can anyone spot what is wrong?
> 
> So I connect to the server with:
> stephen@Avalon:~$ mysql -u root -p
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 11
> Server version: 5.7.26-0ubuntu0.18.04.1 (Ubuntu)
> 
> Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
> 
> Oracle is a registered trademark of Oracle Corporation and/or its
> affiliates. Other names may be trademarks of their respective
> owners.
> 
> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
> 
> mysql>
> ===
> I create grants
> mysql> grant all on rois3324_stephen.*  to "rois3324_stephen"@"localhost" 
> with grant option;
> Query OK, 0 rows affected (0.00 sec)
> ===
> I try to see grants
> mysql> "rois3324_stephen"@"localhost"
> ->
> 
> It looks like no grants were created. And I get a confirming error from PHP.
> 
> Can anyone see what is wrong?
> 
> Thank you!

It's a little while too but seems that the grants are fine and you need to do 
SHOW GRANTS 
for that user.

Here are the oracle docs:
https://docs.oracle.com/cd/E17952_01/mysql-5.0-en/show-grants.html

Not sure if that would be the fix but seems so as the grant query is fine it's 
just not 
showing up when you try to show them.

Hopefully it works now,

Nick
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk


[GTALUG] [OT] mySQL help

2019-05-28 Thread Stephen via talk

I am not on any lists for mysql. So I thought that I would ask her,

Suggestions for a help list for mysql are most welcome.

I have a LAMP for web site development and rarely need to touch the 
database admin stuff.


It has been years. I am creating a new site with database but I can't 
get the user to have privileges.


Can anyone spot what is wrong?

So I connect to the server with:
stephen@Avalon:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.7.26-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.


mysql>
===
I create grants
mysql> grant all on rois3324_stephen.*  to 
"rois3324_stephen"@"localhost" with grant option;

Query OK, 0 rows affected (0.00 sec)
===
I try to see grants
mysql> "rois3324_stephen"@"localhost"
->

It looks like no grants were created. And I get a confirming error from PHP.

Can anyone see what is wrong?

Thank you!
--
Stephen
---
Talk Mailing List
talk@gtalug.org
https://gtalug.org/mailman/listinfo/talk