LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-06-2004, 02:13 PM   #1
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Rep: Reputation: 15

Getting simialr problems, I've found a script mysql.server that is supposed to start the server; it is in /usr/share/mysql/ in Slackware 10.

I am compiling a complete list of where the default paths are because these seem to be the cause of all MySQL errors, as if MySQL has assumed everyone is using something like Redhat or Mandrake or Gentoo or Windows For the MySQL developers: everyone is NOT!

So if the script is run, it reports for me that it can't find host.frm

host.frm is in /var/lib/mysql/mysql/ on Slackware 10, not /var/lib/mysql so your error: Can't find file: './mysql/host.frm' (errno: 13) is similar to the one I get of

No mysqld pid file found. Looked for /var/lib/mysql/Bach.pid.

So now, I have to find a .pid file for which I have no idea where either MySQL or Slackware 10 put it, if it exists, or if MySQL is supposed to create it, as it tried to create the mysql.sock file which didn't work, at first, either.

All of this, I repeat, All of this, is because there is no definitive document on MySQL tree structure for shipped binaries with Linux nor Windows.

An oversight which the users appear to be correcting.

Another Catch-22 is that even if you get the command line working, it still won't work from localhost using a browser; you will get access denied even with the correct username and password. Using phpMyAdmin doesn't help as it needs login privileges which MySQL does not grant initially. The GRANT command is too cryptic currently and if you use it from the command prompt, it just goes to a cursor prompt and there is no explanation of how to make it execute.

MySQL needs two things: an override to access it using the root username and password, regardless of all else and in particular from the browser to get phpMyAdmin working so you can add privileges, and a more basic HOWTO that actually gets MySQL running, instead of reporting every little thing as an error.

In Windows I'm up to the point of being able to log in via command prompt, but no http login. In Slackware I'm building a new HOWTO because of all of the errors being generated without any concise help.

If you find out how to "fake out" MySQL on these stupid errors, like no host.frm or no host.pid, please post here.

I actually created the mysql.sock as a zero-byte kedit file and put it where it belonged; after much changing of configuration and permissions. Slackware 10 uses both Unix sockets and TCP/IP sockets, and pipes should not be restricted to port 3306. This idea of piping to specific ports only serves to make everything "lame." TCP/IP opens up as many sockets as it needs to stream Internet data and programming should not be designed to circumvent that. Ports are not written in stone, not even the well known ports, and never should be; it's bad programming practice pure and simple. Why? Because if a hacker knows the port an application is running on he can get to that port and disrupt it. The Internet idea was and is to create variable ports which cannot be so easily "tagged." It's the same problem as novice hardware engineers trying desparately to assign a specific IRQ to their device. These things were designed to be variable, not constant. But through time many designers and programmers have become somewhat lazy and opted for authoring modules which use specific ports and IRQ's because it takes far more brain power to write modules that look for available ports and IRQ's. And that is the simple cause of so much confusion.

I might add that I do not agree with the use of the my.cnf file with a really stupid plain text username and password! That is incredibly stupid to have on any computer, anywhere.

All stored passwords should be encrypted, hashed, hidden, and locked!

There should be no evidence whatsoever of a password anywhere on any computer, and that includes a server.

If anyone has more definitive information on MySQL, such as where the source code module is for this stuff, like pickiing the mysql.sock, please let them tell us, maybe we can fix the problems in our own compiles.

 
Old 12-06-2004, 03:45 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
GinEric - rather than have your problem get lost in the original thread, I have split it off into it's own thread.
 
Old 12-13-2004, 09:27 PM   #3
GinEric
Member
 
Registered: Nov 2004
Location: Earth
Distribution: Slackware 10, et ux
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks. Tried to affero, but got lost. Where did you put the new thread?

Here's the complete text of my post to the MySQL developers on this subject with the workaround to nearly all of the access denied, mysock, etc., problem.

There were four occurences of this problem, including one with phpMyAdmin.

If you initially set the root password, all the gooeys and commandlines will be locked out except root@localhost

The workaround was to initialize "without root password" and, using another box grant privileges in LAN, fix all privileges.

Using a Linux server and an XP server, phpMyAdmin will run if, and only if, you do not set the root password initially. Logged in with

mysql -hlocalhost
[remember no password was set so you can do this]

You will be warned about it; "The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file! . . ." and so on.

But if you dare change the root privilege, you will be locked back out. You can fix this by using:

grant all privileges on *.* to root@localhost identified by '' with grant option;
flush privileges;

use the same command to grant privileges to at least your root admin account on both machines, include the IP grant, the host grant, and the host.domain.tld grants. Both machines should be able to log into their own and the other machine's MySQL server now.

Then call phpMyAdmin from your browser for both machines from both machines.

That is an exact command, there are two demiquotes in the above, not a single quote [as it appears it may be].

This is a definite "Catch-22" software bug, and not my imagination. Until you get authentication via cookie / httpd working, you will need to access the database from a browser. You cannot do this if you set the root password before preparing the MySQL server. And that is still "Catch-22."

The exact grant is given because the help grant command shows no clearcut example. I do believe it's supposed to be Backus-Nauer Standard Notation, but it's still kind of cryptic without working examples.

There are many problems, not the least of which is "no override switch" for the initial console. Password hashing must match the client-server packet's usage. Permissions must be set on servers for logins by IP, in addition to netbios names and FQDN hostnames.

Afterwards, if you set the root password and can't log in, you can revert to the "no root password" to get back to where you were working.

That is a temporary override and if the developers complain about security issues with an override, one already exists as shown herein.

If the comments here get read and deleted, at least consider putting this simple solution at the top of the list in Access Denied errors because this solution works and gets the administrator back to a place where he can figure out what's wrong!

As an aside, compiling MySQL comixed with Apache and PHP for beta testing fails in all of its --with options because it can't find the source libraries if no running version is present, and it can't find source libraries in side-by-side compiles.

No file is generated listing the package, so you can't find files anyway.

--prefix fails because it can't find system specific libraries and doesn't put executables in the OS required place.

MySQL is great, but still has a lot of simple bugs.

I put this in bug request because it sure looks like a bug to a programmer with decades of experience.

No, I didn't because the site wouldn't let me!

Another bug?

That was my post on MySQL.org

I think it's the overall MySQL root problem [no pun intended]

If you think it unworthy, just delete the post.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration