Alex Thurgood wrote:
Le 22/02/2013 10:53, Ian Whitfield a écrit :

Ian,


Well I'm in a real hole here!!!
This morning I decided to go back to basics and re-installed all the
MySQL packages (in case)

Seriously, that was an unnecessary, and potentially, bad move. I have no idea how PCLinuxOS packages mysql server and its dependencies, so maybe you did indeed overwrite everything.



I now have the situation that I can not CREATE USER so am unable to set
any GRANTS!!
When I try I get the error message "ERROR 1396 (HY000): Operation CREATE
USER failed for 'ianw'@'localhost'"

Yep, sounds like you have overwritten the permissions table.


So is this correct?? Have I now lost my Database?? As I did not back-up
the root at all!!!!

Yes, the mysql data is stored in /var/lib/mysql/data, or sometimes in /var/mysql/data, it DEPENDS on the particular distrib as to where it finally gets put, but usually it is somewhere in a sub-directory of /var. It has been like this for as long as I can remember, and if you had read the mysql manuals like it has been suggested in the past you would know this.


If this is so I think it is very poor practice to store data outside the
'home' partition!!!!

No, it is perfectly reasonable, given that Mysql is a server daemon. Many well behaved Linux daemons (e.g. postfix, mail, printer spool, etc) tend to store their persistent data in /var, their configuration data in /etc, and so on, nothing new there.

You can also manually configure the data directory by editing the configuration files, providing you give the mysql server process the appropriate rights, but I think we are a long way from there at the moment.


Meanwhile phpMyAdmin will not work for me at all even after a re-install
- so as I said I'm in a real hole!!

IF I have lost the Database is there a way to make it save it in the
'home' directory in future??

Yes, change the directory in your mysql configuration files. Please read the fine manual before doing this, as changing the config files without knowing what, or being sure of what, you are doing, can make even your current situation worse.

Again, reading the official manual really helps one come to terms with how everything fits together. Also, because distribs all tend to do their own thing, read the documentation associated with your Linux distrib's version of mysql.

Note that the folder name is /var/lib and not /ver/lib. And yes, you generally require root privileges to be able to read the data in this directory.

Alternatively, you can pop in a Live Distro CD/DVD and use that to look through your file system, without having to be root.

I apologise for sounding imperious, but there really is no substitute for reading the manuals, or at least a decent mysql administrator's book, when it comes to mysql (or any other database server, for that matter).

Alex
Ian,
Yes, you can do it, but just because you can, doesn't make it right. Storing the database in /home is a _very bad idea_! /home is the least secure location, where, as you found out, the current location in /var/lib won't even allow SU to get into it, but I think that is because you have not configured MySQL correctly yet. You need to go back and follow the initial MySQL setup procedure again, as you did in the past. You did write it down, didn't you? This is also a good example of the consequences of not backing up properly. In a past thread of yours, I am sure I mentioned the use of mysqldump, which creates a human-readable SQL backup of your database. If you had done that regularly, you would have a backup to re-create (restore) your database using the mysql program. Without that backup, I am afraid it looks like you are out of luck. With mysqldump, you can specify where the backup file goes, even /home, if you don't care about security. We learn by experience. Make a backup script, as I have, and run it at least monthly to make the backups easy. _Always_ run that backup before you do any messing with system software updates. I am not sure if Base does this, but some database clients (Rekall, for example) use the database to store the table, form, and report definitions. If that is so with Base, then you may have lost all the work you have done in Base also.
Sorry for the bad news.
Girvin Herr


--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to