Hi,
When I start mysql I get the following error: Can’t create secure /var/tmp/mysql.random text.
I really need to start it to access my db’s. please help
Hi,
When I start mysql I get the following error: Can’t create secure /var/tmp/mysql.random text.
I really need to start it to access my db’s. please help
Dear Zeepblok,
You have allready posted some posts here, and without doubt you have also read a few. Thus you must be aware of the fact that for almost any question, those who are eager to help you here want to know at least what level of openSUSE you have. It matters.
Also stories like “When I start …” are only stories to go with your facts. How do you start? Personaly, I would use YaST > System > System services (runlevel), but there are other ways of doing this. And we have no crystal balls.
hcvv wrote:
> Also stories like “When I start …” are only stories to go with your
> facts. How do you start? Personaly, I would use YaST > System > System
> services (runlevel), but there are other ways of doing this. And we have
> no crystal balls.
Well, but that would start the server, mysqld, whereas zeepblok
mentioned starting the client application, ‘mysql’.
Or then again, it may have been a typo in the original report, which
again illustrates the need for clear problem reports.
You may be right and in that case I wonder why it is that difficult to post the command and it’s output between CODE tags here, so no misunderstandings about what is called and what the error is can exist.
Please Zeeblok, clarify. Telling the story is only an extra explanation about what should be foremost: facts as given by the system.
(And when you did not finf the way to post between CODE tags until now, here it is: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html )
IIRC the message on /var/tmp/mysql.random.text is caused by a non running mysqld. If a user starts mysql, and the daemon is not running, an attempt will be made to create the file, and the user has no permissions in that folder. So, my suggestion to Zeepblok would be Henk’s first one: start the daemon in the runlevel editor
Hi,
Sorry the post is a bit vague indeed.
lets retry it:
when i start mysql(serveR) in the yast>system runlevels. it returns an unspecified error.
when i type **service mysql start ** it returns the error **Can’t create secure /var/tmp/mysql.random text. **
so I cant seem to start my sql server, it crashed the day before and I’m having this problem after that.
I’m ussing opensuse 11.4
Ok Zeepblok, this is allready it bit more clear. While people are thinking about this, please contemplate on this:
Saying: "when i type **service mysql start ** it returns the error **Can’t create secure /var/tmp/mysql.random text. " **is not half as telling as: copy/pasting what you have on the terminal screen to the post between CODE tags (http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html )
No typos can be made, no need for making parts of the text in bold, no lay-out spoiled and more.
And when msqld crashed, did you look into logings and dmesg to see if there is anything.
And when I reread the above, the title of this thread should have been somethiing like:
“mysqld crashed and wont’t start anymore”
Because it is most probably the crash that has to be investigated, the failure to restart being a result, not the cause.
Recommend this procedure (Which should fix anything you’ve configured in error).
In YAST,
Remove and then re-install all your MySQL packages (A force update <might> work, but I’ve never tried).
The result is that MySQL will be re-installed with default settings, which generally means no authentication required for localmachine access, remote access denied. Any custom databases you created <may> survive the re-installation but I’d recommend you remove those and start over as well.
Note that on a system with a just-installed MySQL, the application is stopped. Although you could and should be able to start the MySQL engine manually, if you’ll prefer it starting on its own in the future you don’t attempt any manual start even in the beginning, go immediately to YAST > Run Levels > Advanced Setting (I don’t know whether you did that, is missing from your post). From that, configure automatically start on boot, then start MySQL.
You should successfully start MySQL, and you can then access MySQL either from the CLI or by installing MySQL Workbench or any other database management app that supports MySQL.
Only <after> doing the above and verified a working deployment you can modify, ie Configure a User account with remote access permissions, create and configure a custom database. Also, don’t know if it’s an issue in your case but I highly recommend using namespaces without spaces and using uncommon names that aren’t likely used elsewhere (avoid names like test for example).
HTH,
TS
Hi,
Thank you for the tip. But is there a way to safeguard my database? I can’t access it with phpmyadmin becouse mysql won’t start, so a normal export is’nt an option.
On 2012-03-22 08:56, Zeepblok wrote:
>
> Hi,
>
> Thank you for the tip. But is there a way to safeguard my database? I
> can’t access it with phpmyadmin becouse mysql won’t start, so a normal
> export is’nt an option.
Please paste here the command and its output, as requested previously,
inside code tags. Like this:
Telcontar:~ # service mysql start
Starting service MySQL done
Telcontar:~ #
And then do the same for “tail -25 /var/log/mysqld.log”.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
service mysql start
Can't create secure /var/tmp/mysql.fOkG9G
failed
tail /var/log/mysql/mysqld.log-20120317
120320 14:35:27 [ERROR] Failed to open log (file './mysql-bin.000001', errno 13)
120320 14:35:48 [ERROR] Failed to open log (file './mysql-bin.000001', errno 13)
120320 14:36:11 [ERROR] Failed to open log (file './mysql-bin.000001', errno 13)
120320 15:00:47 [Note] /usr/sbin/mysqld: Normal shutdown
120320 15:00:47 [Note] Event Scheduler: Purgiing the queue. 0 events
120320 15:00:47 InnoDB: Starting shutdown...
120320 15:00:49 InnoDB: Shutdown completed; log sequence number 0 44233
120320 15:00:49 [Note] /usr/sbin/mysqld: Shutdown complete
Just looking at the error message, can you check the status of /var/tmp (because it says it can not create there)?
Mine is:
boven:/var/tmp # ls -dl /var/tmp
drwxrwxrwt 170 root root 4096 Mar 22 10:34 /var/tmp
boven:/var/tmp #
And here you can see I have several of those things MySQL wants to create:
boven:/var/tmp # ls -dl /var/tmp/my*
drwx------ 2 mysql mysql 4096 Nov 9 19:40 /var/tmp/mysql.7WnVqV
drwx------ 2 mysql mysql 4096 Dec 6 09:50 /var/tmp/mysql.D5seGR
drwx------ 2 mysql mysql 4096 Dec 28 10:36 /var/tmp/mysql.DqUGZB
drwx------ 2 mysql mysql 4096 Dec 6 09:22 /var/tmp/mysql.ROAeow
drwx------ 2 mysql mysql 4096 Mar 22 10:34 /var/tmp/mysql.d70XPj
drwx------ 2 mysql mysql 4096 Nov 9 09:49 /var/tmp/mysql.jjWAts
drwx------ 2 mysql mysql 4096 Dec 6 09:45 /var/tmp/mysql.put22X
boven:/var/tmp #
And anothr thing comes to my mind: is there still space in the fs where* /var/tmp* is? It is not that logical, because then you would have much more problems I guess, but nevertheless look at:
df /var/tmp
And btw, your posting using CODE tags is OK, but including the prompts at begin and end is better. They do also tell things to the readers and the copy/past is almost as easy to do.
Webserver:~ # service mysql start
Can't create secure /var/tmp/mysql.fOkG9G
failed
Webserver:~ #
Webserver:~ # tail -25 /var/log/mysql/mysqld.log
Webserver:~ #
Webserver:/ # ls -dl /var/tmp
drwxrwxrwt 20 bin root 4096 Mar 22 12:55 /var/tmp
Webserver:/ # ls -dl /var/tmp/my*
drwx------ 2 bin mysql 4096 Mar 21 15:16 /var/tmp/mysql.CTzK6X
drwx------ 2 bin mysql 4096 Mar 21 15:14 /var/tmp/mysql.FWUE84
drwx------ 2 bin mysql 4096 Mar 22 09:26 /var/tmp/mysql.ILAomC
drwx------ 2 bin mysql 4096 Mar 21 15:15 /var/tmp/mysql.PdAs2t
drwx------ 2 bin mysql 4096 Mar 22 13:28 /var/tmp/mysql.PwUHlL
drwx------ 2 bin mysql 4096 Mar 21 15:15 /var/tmp/mysql.SAzy2V
drwx------ 2 bin mysql 4096 Mar 22 09:00 /var/tmp/mysql.UXjmys
drwx------ 2 bin mysql 4096 Mar 22 10:37 /var/tmp/mysql.VIzo81
drwx------ 2 bin mysql 4096 Mar 22 13:27 /var/tmp/mysql.b0ecne
drwx------ 2 bin mysql 4096 Mar 22 12:55 /var/tmp/mysql.fOkG9G
drwx------ 2 bin mysql 4096 Mar 21 15:14 /var/tmp/mysql.n6Y9vH
drwx------ 2 bin mysql 4096 Mar 22 10:24 /var/tmp/mysql.t11BcV
Webserver:/ # df /var/tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20641788 3668248 15924916 19% /
Hope its better this way
On 2012-03-22 13:06, Zeepblok wrote:
> Code:
> --------------------
>
> service mysql start
> Can’t create secure /var/tmp/mysql.fOkG9G
> failed
>
> --------------------
Sorry, but this is incomplete. I do not see the complete line where the
service was called. See mine in the previous post, I posted it so that you
could see what I wanted.
I see Henk mention this as well, so please repeat.
> the tail command does’nt give anything back/
I suppose you did it right, but I would prefer to see the copy paste of the
command with the blank output and the next system prompt.
Don’t think I’m being fastidious or pesky or something; I really need to
see what I request
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
This looks almost perfect. The prompt at the end is missing. We have it as you should have seen. It proves to us, you have realy copied/pasted everything.
But, alas, it doees not show any strange things to me. We have to search for another direction.
(BTW it now shows you have no text “random.text” as you posted earlier as being litteraly what you got., but something different. See how you made people not understanding you and tearing their hear out?)
A thing you also did not tell is why you want to start MySQL on the flight. I guess it is normaly running from boot to shutdown and started/stopped automaticaly. Thus where you changing something? Did you change something before it went wrong? As you say you have a database, it must have run earlier allready.
It did run earlier a few weeks. but after a crash it wont start anymore. in yast>systemrunlvls it is put in autostart but wo’nt start. If I use the service mysql start command it gives the error as above
And you have installed the MySQL from the standard OSS repo?
I do see something odd: the files in /var/tmp/my* are owned by bin, perms 700. So user mysql cannot write there IMO a “chown mysql /var/tmp/my* -R” should do.
It is odd. But as the directory* /var/tmp* is the same as I have, why can’t it create. I would understand when it can not read. Maybe the error message is a bit strange.
In any case I would try this. And also ask myself why this can be owned by user* bin*? I e.g. have no process running under bin at all!
To add @Knurpht: you think the directory is created by a process running as bin and then another process running as mysql tries to create something inside and thus fails. Very strange.