Page 1 of 1

PHP v BASH

Posted: Fri Aug 05, 2016 7:18 am
by Vegan
I am now operating a Linux VM so I am now working with BASH in addition to PHP


sudu apt-get update
sudo apt-get upgrade
sudo apt-get install mysql-server

need a better database appliance

Re: PHP v BASH

Posted: Fri Aug 05, 2016 8:19 am
by Celauran
Is there a question in there somewhere?

Re: PHP v BASH

Posted: Fri Aug 05, 2016 11:34 am
by Christopher
Probably just more signature link spamming.

Re: PHP v BASH

Posted: Fri Aug 05, 2016 1:01 pm
by Vegan
i was wondering if PHP can handle most of the MySQL work, not to sure how to get it linked up

some tasks like

mysqlcheck -u root -p --check --databases dbname
mysqlcheck -u root -p --optimize --databases dbname
mysqlcheck -u root -p --analyze --databases dbname


are shell but I would like to be able to call such tools from a web page form

other thinks I thought about are

mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;

so I was wondering how to generate a new database fast through a web form

i was wanting to use per user accounts so the databases are stored with user folder etc

so adduser needs to be called etc

Re: PHP v BASH

Posted: Fri Aug 05, 2016 1:13 pm
by Celauran
Sounds like maybe you want something like Adminer or phpMyAdmin. Why through a web page? Something like Sequel Pro or Heidi SQL via SSH tunnel will provide a considerably better experience.

Re: PHP v BASH

Posted: Fri Aug 05, 2016 1:42 pm
by Vegan
I have used phoMyAdmin with a 3rd party product, I am trying my hand at rolling my own

sudo lshw -class disk

which found the 50GB i created, so I partitioned it GPT with fdisk, formatted ext4 unless there is something better for mysql

not sure if I can stuff the storage under the default MySQL or should I edit the config file?

suggestions?

Re: PHP v BASH

Posted: Fri Aug 05, 2016 2:35 pm
by Celauran
Vegan wrote:I have used phoMyAdmin with a 3rd party product, I am trying my hand at rolling my own
Why?
Vegan wrote:not sure if I can stuff the storage under the default MySQL or should I edit the config file?
Not clear what you mean here. It may vary some by distro, but it's usually under /var/lib/mysql. Does that not work for your setup?

Re: PHP v BASH

Posted: Fri Aug 05, 2016 3:04 pm
by Vegan
I am using Ubunto 16.04 so whatever that flavor is using, I was not sure how to make the mount persistent

/sql is where i wanted to stuff the database for want of a location

/etc/fstab seems to be present, wanted the mount to be up when rebooted so the database is up right away

sudo mkdir /sql
sudo mount -t ext4 /dev/sdc /sql

Re: PHP v BASH

Posted: Fri Aug 05, 2016 3:21 pm
by Celauran
You should be able to just specify new datadir and socket values in your my.cnf

Re: PHP v BASH

Posted: Fri Aug 05, 2016 4:08 pm
by Vegan
for some reason there are no datadir or socket values at all in that file, adding them spawns an error

wonder what gives?

I have /sql as my storage, there is a blue mysql file there

so that seems to be ok