-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mysql #28
Comments
I don't know what's wrong with mysql, but on my test platform it's crashing when trying to create privileges table. Also crashing when issuing simple commands, like |
I've managed to port mysql 5.7.9 to Optware-ng. It appears to work fine, at least, I'm able to connect and execute simple sql queries on my ARMv7 router. Binaries will arrive a bit later, since I also need to bump some mysql-dependent packages, not to mention building mysql for other targets (mysql 5.7.9 takes much longer to build than old mysql versions). |
Binaries uploaded. It turned out that starting from 5.7.5 mysql requires gcc builtin atomics, some of which aren't available for some Optware-ng archs, so we currently have two flavors of mysql: I tested both 5.7.9 and 5.7.4 on armv7 and mipsel routers, respectively, and they work fine. Just had to make sure to have swap space, since mysqld is rather memory-consuming. |
Thanks, you are fast, I can't find v5.7 just v4.1 and 5.0 |
5.7.4 is now the default version, it's called |
Can't start it
|
It looks to me that you have database 'leftovers' left from previous mysql version(s) (4.1 or 5.0), which weren't properly initialized. Try this:
This will clean the 'leftovers' and trigger mysql initialization. |
Clean optware-ng install
Error
Tried to create db
|
There's an error in postinst script in command that should install privilege tables:
it should be:
Run it manually, I'll fix it soon. Together with P.S. all those '/' escapes are meaningless, you can do this with
|
Fixed: 383653c |
Clean install and same error, now I seen mysql requires "perl" package, installed and another error
Tried /opt/scripts/mysql_install_db --force but first should modify: Now another error, /opt/scripts/mysql_install_db --force
|
Thanks for find about perl. If you launch
The "[ERROR] [FATAL] InnoDB: pthread_create returned 11" error most likely means you've run out of memory, and need to setup swap partition or file:
(see here) |
Ok, all fine until I want to login as root
And when I start it I get
|
If you initialized mysql using
it will first ask for current password (from |
As for this error:
This is clearly a permissions error. Mysql config cannot be writable for all (permissions for 'all users' cannot be
|
I think we are passed 90% :)
In /opt/var/mysql/.err
Now I run /opt/scripts/mysql_install_db --basedir=/opt --datadir=/opt/var/lib/mysql --lc-messages-dir=/opt/share/english and it's all fine
Time to know generated password
Run mysql -u root -p
Some questions:
|
I will remove COPYING INSTALL-BINARY and README files, which were automatically installed, but /opt/my.cnf doesn't come from mysql package:
From what I can gather, it's being created automatically by the As for root password, it looks like adding To sum up, I'm going to do the following:
|
Mysql installs and start fine, thanks 👍
Can we add a delay for about 60 seconds? |
Adding sleep time will not solve this because after reboot, mysql will not start at all, only if I do a clean install :( |
You have to issue
Though, on my Asus RT-N66U mysql-5.7.4 works even without swap file. And after reboot it still works OK. That As for |
Something wrong with the installer, did you modified it since last time?
|
No, I haven't modified it, and it works fine on my router:
Try to launch it in the foreground to see the error message:
|
Same error, I don't think my router's ram is faulty
Do you still have the previous ipk which worked for me? |
I don't delete previous versions from the server, they're just not indexed:
comment was actually after the last update |
The error you have is due to insufficient memory. Here's an exactly the same issue on stackoverflow:
means that system function |
After many, many tries, I realised that 512MB swap are not enough but 1GB yes. |
512MB not enough? Well, it's possible. In almost idle state mysqld is eating up more than 350MB on my RT-N66U. But still odd. |
Thanks, after restarting mysql, I get this error
So I added in /opt/etc/my.cnf
And it's ok |
Actually it's not ok, if I want to edit some value with phpmyadmin, get error: Operation not allowed when innodb_force_recovery > 1 |
This error indicates that your database got corrupted. You can either try to recover it (google for it) or if it doesn't contain anything important, reinitialize:
If this happens again, you should try to look for the possible causes, e.g. by checking out the logs. At least I can say it doesn't happen to me with a freshly initialized database after mysql restart:
|
Needless to say, you shouldn't need to set
in the config file. This option is needed during crash recovery only. |
I'm going crazy with this errors, now installing and restarting is fine after increased swap to 1Gb but after installing osticket and restarted mysql I get the same error
Dunno what to do anymore |
Well, 5.7.4 may be buggy, since it's still rather old. I looked a bit deeper into why 5.7.9 won't build for mipsel arch, and it's cause 64 bit atomics aren't possible for this arch. There's something I want to try, if I succeed, I'll make a test build for you to test it if you don't mind. But don't hold your breath: it'll take some time. |
Of course I want to try, waiting patiently... |
http://optware-ng.zyxmon.org/test/buildroot-mipsel-ng/mysql_5.7.9-5_mipsel.ipk
What I've done was to replace unsupported 64bit atomic operations with non-atomic variants. If it proves to be stable (relying on you to test), I will push it to the repos for all targets that currently have 5.7.4. |
Also, if you wish to test using php mysql(i) extension, please issue this command
This is needed, since libmysqlclient soname changed from libmysqlclient.so.18 in 5.7.4 to libmysqlclient.so.20 in 5.7.9. I will upgrade php-mysql package (and some others) to be linked properly if 5.7.9 works well. |
It's installing fine, restarting but when osticket trying to create tables I get errors
|
I don't see any issues. This
error is OK. |
As soon as osticket starting install, I get a blank web page and a lot of
in .err |
To rule out |
This is not a mysql issue you're having with osticket, but more likely a php issue. I successfully installed osticket on armv7, with lots of
I will try to debug it, hopefully I'll find a solution, unlike the last time |
Yes, it's strange, but with previous mysql version php not crashing, only db get corrupted. |
Huh, the issue here was due to php mysqli extension compiled against previous (5.7.4) mysql version. It was just a matter of recompiling. I got osTicket to install and work OK on my mipsel router. Please test it yourself (mysql 5.7.9 and fixed php are now in repos). |
Sorry for the late reply, YOU DID IT, thanks 👍 |
I'm hesitant to compile with '-DNO_FALLOCATE' flag, since posix_fallocate() is good to be used with SSDs. As I recently learnt, posix_fallocate() is implemented using fallocate() system call, and, as the fallocate(1) program man page says:
So, in theory, Optware-ng can be used with ext4 formatted SSD, where fallocate() is highly recommended, so we don't want to disable it. As for filesystems that don't support this call, posix_fallocate() is used only in 'O_DIRECT' innodb_flush_method (which is triggered during db creation regardless of the settings), and if it fails it falls back to 'fsync' (which is the default), which doesn't use posix_fallocate(). After looking into the sourcecode, innodb seems to check whether filesystem supports posix_fallocate() before using it, however this check always falsely returns 'true' for some reason, and uclibc-ng, unlike glibc, doesn't emulate this function in this case (and this may be a good thing, since glibc man states this emulation is inefficient and with possible race condition). |
This was a good explanation, so there is no solution to suppress messages, it's ok 👌, at least mysql working fine :) |
Great, thanks! You can try nginx now too. I haven't tested it in combination with php, but it starts OK now. |
I have the same issue as described in the latest post on https://www.hqt.ro/how-to-install-mysql-server-phpmyadmin-through-optware-ng/ I get the exact same error just with ac87u.pid |
@damonp16 You probably mean this error:
This can be easily fixed by removing data directory In the future, please provide error info in your posts, rather than giving a link: having to dig through unrelated messages in search of your error is rather discouraging. Also, better create new issues, rather than hijacking old closed ones. |
I think is this error:
And I have created 2GB swap file :( |
@TeHashX did it work with 5.7.9? I can roll back to it from 5.7.11 |
Of corse it worked, all steps on my tutorials are verified :) |
I'll roll back to 5.7.9 for now then -- it's easier than fixing 5.7.11 |
@TeHashX it's being rebuilt now. It won't be downgraded automatically on the end-users side: it'll require something like P.S. See http://jenkins.nas-admin.org/view/Optware/ for build status |
I confirm, v5.7.9 works fine 👍 |
Can't start mysql, modified some lines but still can't connect:
But can't log as root, asking me for a password
With mysql5, I get
The text was updated successfully, but these errors were encountered: