wildweaselmi Posted April 8, 2011 Share Posted April 8, 2011 To Create Mysql user mysql_install_dbmysqladmin -u root password YOURPASS mysql -u root -pPassword: YOUR PASSmysql>create database DBNAME;mysql>\q TO import mysql torrentflux < omggggg.sql -u root -pPassword: YOUR PASS Quote Link to comment Share on other sites More sharing options...
shadowmac Posted April 8, 2011 Share Posted April 8, 2011 This is what works for me sudo apt-get install mysql-serversudo /etc/init.d/mysql startmysqladmin -u root -p create mydatabase Quote Link to comment Share on other sites More sharing options...
shadowmac Posted April 8, 2011 Share Posted April 8, 2011 I saw this post and I figured I would add my two cents. Here is a snippet of what I use to create the pureftp database from command line in mysql on my ubuntu box Create a database called pureftpd and a MySQL user named pureftpd which the PureFTPd daemon will use later on to connect to the pureftpd database: mysql -u root -pCREATE DATABASE pureftpd;GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON pureftpd.* TO 'pureftpd'@'localhost' IDENTIFIED BY 'ftpdpass';GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON pureftpd.* TO 'pureftpd'@'localhost.localdomain' IDENTIFIED BY 'ftpdpass';FLUSH PRIVILEGES; Replace the string ftpdpass with whatever password you want to use for the MySQL user pureftpd. Still on the MySQL shell, we create the database table we need (yes, there is only one table!): USE pureftpd;CREATE TABLE ftpd (User varchar(16) NOT NULL default '',status enum('0','1') NOT NULL default '0',Password varchar(64) NOT NULL default '',Uid varchar(11) NOT NULL default '-1',Gid varchar(11) NOT NULL default '-1',Dir varchar(128) NOT NULL default '',ULBandwidth smallint(5) NOT NULL default '0',DLBandwidth smallint(5) NOT NULL default '0',comment tinytext NOT NULL,ipaccess varchar(15) NOT NULL default '*',QuotaSize smallint(5) NOT NULL default '0',QuotaFiles int(11) NOT NULL default 0,PRIMARY KEY (User),UNIQUE KEY User (User)) TYPE=MyISAM;quit; As you may have noticed, with the quit; command we have left the MySQL shell and are back on the Linux shell. BTW, (I'm assuming that the hostname of your ftp server system is server1.example.com) you can access phpMyAdmin under http://server1.example.com/phpMyAdmin/ (you can also use the IP address instead of server1.example.com) in a browser and log in as the user pureftpd. Then you can have a look at the database. Later on you can use phpMyAdmin to administrate your PureFTPd server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.