Using SSH to command Mysql (php.ini)

2 views
Skip to first unread message

Pseudonyme

unread,
Sep 9, 2010, 11:37:30 AM9/9/10
to Professional PHP Developers, e...@adverland.com
Hi all,

We have a big problem using linux and mysql.

From Linux we are calling scripts that modifies mysql data.

From SSH :
[root@dedicated cron-scri]# sh /etc/script/01_cpm
: No such file or directoryline 1: /etc/script/06_cpm.sql

[root@dedicated cron-scri]# more /etc/script/01_cpm
mysql --user=root --password=YYY222 --database=Bonjour_prod < /etc/
script/06_cpm.sql

Our Mysql scripts do not work anymore. When sh the listed script ...
it cannot connect to mysql has it did for years.

When we do the command to ask Mysql : it does not work without a
password and we wanna a get rid of this password if the problem comes
from there.

[root@dedicated cron-scri]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: NO)
[root@dedicated cron-scri]#

We searched through PHP.INI, through out the whole web ... and
nothing.

Please Help,

Norman

Jack Timmons

unread,
Sep 9, 2010, 12:10:56 PM9/9/10
to professi...@googlegroups.com

PHP is not going to fix your issue at all. What you're going to have
to do is contact whoever you're hosting with directly and work with
them to fix your problems. We are not going to be able to help you,
because there is no way to make what you want work if they are
blocking it. And I will highly, highly doubt they will allow you to
run MySQL root without a password, because that, in all honestly, is
both uncalled for and begging for you to find yourself without any
data, it all having been stolen by anyone with any sort of access to
the server.

--
Jack Timmons
@_Codeacula

Robert Gonzalez

unread,
Sep 9, 2010, 12:56:05 PM9/9/10
to professi...@googlegroups.com
+1 Jack. And I would add, if your user does not have localhost access (or if the localhost hostname is NOT localhost but you have localhost access) then your access would not work. This could have changed with recent migrations of servers, changing a hostname on the box or any other sort of change to the hosted machine.

If you don't manage the box yourself contact the administrator of the box to find out what has changed recently.


--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professi...@googlegroups.com
To unsubscribe from this group, send email to Professional-P...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP

Pseudonyme

unread,
Sep 9, 2010, 1:23:21 PM9/9/10
to Professional PHP Developers

We just asked Hostway (Valueweb).
What do you think is the problem

------- 1 connect to SSH

------- 2 type mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: NO)

We dont want errors.

----- 3 Play script
sh /etc/script/01_cpm

Result :
: No such file or directoryline 1: /etc/script/06_cpm.sql

more /etc/script/01_cpm
mysql --user=root --password=YYY222 --database=Bonjour_prod < /etc/
script/06_cpm.sql


Our Mysql scripts do not work anymore.

Thank you for your suggestion or expertise regarding this important
issue.


Reply all
Reply to author
Forward
0 new messages