[RESOLVED] running a database how?

Ask questions about Arch Linux ARM. Please search before making a new topic.

Re: running a database how?

Postby Raymondday » Tue Nov 22, 2011 5:41 am

How do I read the logs? What's the command to do that?

-Raymond Day
Raymondday
 
Posts: 77
Joined: Sat Nov 19, 2011 1:46 pm

Re: running a database how?

Postby Raymondday » Tue Nov 22, 2011 5:48 am

I think I got it. The error message is like this:

$this->bbcode_second_pass_code('', '111120 07:35:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
111120 7:35:42 InnoDB: The InnoDB memory heap is disabled
111120 7:35:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111120 7:35:42 InnoDB: Compressed tables use zlib 1.2.5
111120 7:35:42 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
111120 7:35:42 InnoDB: Completed initialization of buffer pool
111120 7:35:42 InnoDB: Fatal error: cannot allocate memory for the buffer pool
111120 7:35:42 [ERROR] Plugin 'InnoDB' init function returned error.
111120 7:35:42 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
111120 7:35:42 [ERROR] Unknown/unsupported storage engine: InnoDB
111120 7:35:42 [ERROR] Aborting

111120 7:35:42 [Note] /usr/bin/mysqld: Shutdown complete')

That goes over and over in the /var/lib/mysql/alarm.err file.

Maybe it's says it don't have runs out of memory? If it ran's out of memory don't it use the Hard Drive for temp. memory?

-Raymond Day
Raymondday
 
Posts: 77
Joined: Sat Nov 19, 2011 1:46 pm

Re: running a database how?

Postby pepedog » Tue Nov 22, 2011 9:43 am

Search this forum for mkswap or swapon, basically you will dd a new file, format it as swap, then turn it on.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: running a database how?

Postby hydro » Tue Nov 22, 2011 10:00 am

Here is another possible solution.
viewtopic.php?f=15&t=1700
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: running a database how?

Postby Raymondday » Tue Nov 22, 2011 12:46 pm

I don't think the low RAM is what's wrong. Because I worked for over a hour with the links you gave and did a lot.

Made the big swapfile and rebooted.

Edit and changed the /etc/mysql/my.cnf file a lot and after I did started mysql but it all ways [FAIL]'s.

Here is the start and end with all between the /var/lib/mysql/alarm.err file. I put the long ---- between the 2.

$this->bbcode_second_pass_code('', '111120 07:35:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
111120 7:35:42 InnoDB: The InnoDB memory heap is disabled
111120 7:35:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
111120 7:35:42 InnoDB: Compressed tables use zlib 1.2.5
111120 7:35:42 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
111120 7:35:42 InnoDB: Completed initialization of buffer pool
111120 7:35:42 InnoDB: Fatal error: cannot allocate memory for the buffer pool
111120 7:35:42 [ERROR] Plugin 'InnoDB' init function returned error.
111120 7:35:42 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
111120 7:35:42 [ERROR] Unknown/unsupported storage engine: InnoDB
111120 7:35:42 [ERROR] Aborting

111120 7:35:42 [Note] /usr/bin/mysqld: Shutdown complete

------------------------------------------------------------------------------------

111122 05:53:40 mysqld_safe mysqld from pid file /var/lib/mysql/alarm.pid ended
111122 06:12:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
111122 6:12:30 [Note] Plugin 'InnoDB' is disabled.
111122 6:12:31 [ERROR] /usr/bin/mysqld: unknown option '--skip-locking'
111122 6:12:31 [ERROR] Aborting

111122 6:12:31 [Note] /usr/bin/mysqld: Shutdown complete

111122 06:12:31 mysqld_safe mysqld from pid file /var/lib/mysql/alarm.pid ended')

All right it works now!

Wile I was righting this checked a little more things and changed back the /etc/mysql/my.cnf the default how it came in the install. Wow it works after all this time. I guess maybe it was I needed more swopfile RAM.

Look at my term. Window:

$this->bbcode_second_pass_code('', 'login as: root
root@192.168.2.114's password:
Last login: Mon Nov 21 23:21:45 2011 from 192.168.2.101
[root@alarm ~]# /etc/rc.d/mysqld start && mysql_secure_installation
:: Starting MySQL Server [FAIL]
[root@alarm ~]# /etc/rc.d/httpd start
:: Starting Apache Web Server [DONE]
[root@alarm ~]# /etc/rc.d/mysqld start && mysql_secure_installation
:: Starting MySQL Server [FAIL]
[root@alarm ~]# /etc/rc.d/mysqld start
:: Starting MySQL Server [FAIL]
[root@alarm ~]# /etc/rc.d/mysqld start
:: Starting MySQL Server [DONE]
[root@alarm ~]# /etc/rc.d/mysqld stop
:: Stopping MySQL Server [DONE]
[root@alarm ~]# /etc/rc.d/mysqld start && mysql_secure_installation
:: Starting MySQL Server [DONE]




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):')

I think the error message helped me. It would say this:

$this->bbcode_second_pass_code('', '111122 6:36:10 [ERROR] /usr/bin/mysqld: unknown option '--skip-locking'
111122 6:36:10 [ERROR] Aborting')

That's were I thought some setting in the /etc/mysql/my.cnf was wrong and set it back to how it came.

Now to set this up and see if things work.

-Raymond Day
Raymondday
 
Posts: 77
Joined: Sat Nov 19, 2011 1:46 pm

Re: running a database how?

Postby pepedog » Tue Nov 22, 2011 1:14 pm

Of course it works, had phpbb and a cloud server working (both slow). If you can get php/MySQL on another web server that uses a smaller footprint it might be better.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: running a database how?

Postby Raymondday » Tue Nov 22, 2011 1:27 pm

I want to try and run it on this because it's very small server and uses very little power.

Thanks for all your help people. Been testing this and it seems to be working good now.

-Raymond Day
Raymondday
 
Posts: 77
Joined: Sat Nov 19, 2011 1:46 pm

Re: [RESOLVED] running a database how?

Postby hp79 » Mon Mar 12, 2012 7:32 am

I just reinstalled everything on my Pogoplug with 128MB RAM, and couldn't get the mysql installed. Later on I found out it is a limitation from the RAM, so I need to add a swap.


I followed the guide from here to create a swap file:
https://wiki.archlinux.org/index.php/Swap

$this->bbcode_second_pass_code('', 'dd if=/dev/zero of=/swapfile bs=1M count=512
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile')

Edit /etc/fstab and add an entry for the swap file:
$this->bbcode_second_pass_code('', '/swapfile none swap defaults 0 0')

Then, I had to restart the pogoplug, and finally I was able to start the command:
rc.d start mysqld && mysql_secure_installation

I wish something like this or information about 128MB FREE RAM requirement was posted in the LAMP wiki.
https://wiki.archlinux.org/index.php/LAMP#MySQL


Now I find a post about running MyISAM as a default, but is this something I really need to do?
http://archlinuxarm.org/forum/viewtopic.php?f=15&t=1700


I also edited /etc/mysql/my.cnf to use less RAM, but I got an error if I add these:
source: http://wiki.vpslink.com/Low_memory_MySQL_/_Apache_configurations
$this->bbcode_second_pass_code('', '# For low memory, Berkeley DB should not be used so keep skip-bdb uncommented unless required
skip-bdb
# For low memory, InnoDB should not be used so keep skip-innodb uncommented unless required
skip-innodb')
So I removed these lines again.
hp79
 
Posts: 9
Joined: Fri Feb 24, 2012 6:46 am

Previous

Return to User Questions

Who is online

Users browsing this forum: No registered users and 12 guests