MySQL error /usr/libexec/mysqld: unknown option ‘–skip-bdb’

MySQL version 5.1.47 failing to start after upgrade?  Here is the brief:

Problem: tail -f /var/log/mysqld.log

1
/usr/libexec/mysqld: unknown option '--skip-bdb'

After poking around for a quick solution, nobody seemed to release that the bdb dependncy is no longer used in /etc/my.cnf configuration file.

Old my.cnf:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[mysqld]
set-variable=local-infile=0
query-cache-type = 1
query-cache-size = 6M

datadir=/var/lib/mysql
#socket=/usr/libexec/mysqld
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2

New:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[mysqld]
set-variable=local-infile=0
query-cache-type = 1
query-cache-size = 6M

datadir=/var/lib/mysql
#socket=/usr/libexec/mysqld
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

#skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
#skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
Read More

Add jail shelled FTP/SSH user on CentOS / Plesk

The process of adding a new FTP user with SSH access to a Plesk / CentOS server is more difficult than it needs to be.  Plesk will only allow you to add WebUsers to your domains which have FTP accounts, not full SSH accounts.  Here is the quick and dirty. We want our new user to be in chroot jail and to inherit the same permissions as another user on the system.  The user will be restricted to the top level directory you define (for example httpdocs in this case).

Login as Root:

1. 

1
cat /etc/passwd/ | grep 'anyusername'

This will return:

anyusername:x:10009:2524::/var/www/vhosts/anydomain.com:/bin/bash

The first set of numbers after “:x:” is the UID or User Identifier.  We will use this in the next command to copy the same permissions.

2.

1
useradd -u 10009 -o -d /var/www/vhosts/anydomain.com/httpdocs/ -g psaserv -s /usr/local/psa/bin/chrootsh newusername

Replace “anydomain.com” with your domain, and “newusername” with the new user you would like to add.

3.

1
passwd newusername

Gives the user a password.

4.

1
usermod -s /bin/bash newusername

Boom! Done.

Extras:
For an in-depth discussion on working with rssh, chroot, and users – see UnixCraft

Read More

Settings Wireless Region Linux – Channel 13 Backtrack 4

One of the most recent problems I stumbled upon while running Backtrack, or any other linux distro for that matter is setting the region on a wireless card.  The typical procedure is :

1
iwconfig wlan0 channel 13

And commonly you will get

1
2
3
error for wireless regquest ''set frequency''
(8b04)
set failed on device wlan0 ; invalid arugment

There is an easy fix for this that will allow you to change the region mode your wireless adapter is in.

1
iw reg set FR
1
iw reg set US

More on IW here.

References:

Channel

Center Frequency

Frequency Spread

1

2412 MHz

2399.5 MHz – 2424.5 MHz

2

2417 MHz

2404.5 MHz – 2429.5 MHz

3

2422 MHz

2409.5 MHz – 2434.5 MHz

4

2427 MHz

2414.5 MHz – 2439.5 MHz

5

2432 MHz

2419.5 MHz – 2444.5 MHz

6

2437 MHz

2424.5 MHz – 2449.5 MHz

7

2442 MHz

2429.5 MHz – 2454.5 MHz

8

2447 MHz

2434.5 MHz – 2459.5 MHz

9

2452 MHz

2439.5 MHz – 2464.5 MHz

10

2457 MHz

2444.5 MHz – 2469.5 MHz

11

2462 MHz

2449.5 MHz – 2474.5 MHz

12

2467 MHz

2454.5 MHz – 2479.5 MHz

13

2472 MHz

2459.5 MHz – 2484.5 MHz
Read More

Acer Aspire 3690 Broadcom Wireless 43xx Ubuntu 9.10 Karmic

Issue : After installing Ubuntu 9.10 wireless and wired networking are either working sporadicly or not at all.  The most vanilla solution you will find.

Target : Acer Aspire 3690-2159

OS : ubuntu-9.10-desktop-i386

Hardware : Broadcom 4318 Wireless Adapter

Ensure your wireless switch is turned on in the front before reading step 1.

1.  Install Ubuntu 9.10

2.  Plug in active internet connection the Wired ethernet

3.  Run update-manager

4.  Restart after Kernel update

5.  Now with internet still plugged in, goto System>Administration>Hardware Drivers

6.  Select the Broadcom B43 wireless drive and click activate.

7.  Type in your administrator password

8.  Restart

et Voila.

Read More

Create multiple email accounts Plesk 8

After much hunting around and reading through the Plesk Administrator Guide I finally found an easy way for creating multiple e-mail accounts in batch!  This is not a MySQL hook or database related, but stems from the logic of wanting to create multiple accounts at once.

To create an e-mail account in Plesk, first login to your server via SSH.

Execute the following:

/usr/local/psa/bin/mail --create new@yourdomain.com -passwd newpassword-cp-access false

If you want to run a batch, create a script:

1
2
3
4
5
6
7
8
9
#/bin/bash

/usr/local/psa/bin/mail --create new@yourdomain.com -passwd newpassword-cp-access false

/usr/local/psa/bin/mail --create new@yourdomain.com -passwd newpassword-cp-access false

/usr/local/psa/bin/mail --create new@yourdomain.com -passwd newpassword-cp-access false

/usr/local/psa/bin/mail --create new@yourdomain.com -passwd newpassword-cp-access false
Read More