-
Notifications
You must be signed in to change notification settings - Fork 967
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
several tables not getting created #649
Comments
Hi, why didnt you let the script creates your database? |
I did that the first time, and same effect. This did not work and I get the missing tables. So I rebuilt it with the same process, but selected 'create only the tables' option. Are you suggesting I should be giving the script 'root' to create and use the database? |
@magicmissile72 I dont know what is happening. Usually is very simple, you just let the script creates the database. and that is the way I usually do. |
I tried it again with a fresh install. Attempted to use root...but, if I run the 'mysql_secure_installtion', the root@localhost fails. So I continued with the install like before, and this time captured the error the install page gives: Sorry!Error performing query ' CREATE TABLE IF NOT EXISTS It seems to create everythine else correctly... root@video:/var/www/html# mysql -u youphptube -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 17 Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; MariaDB [(none)]> use youPHPTube Database changed MariaDB [youPHPTube]> The Encoder seems to install fine and works...that is I can login, upload a video and it makes three versions and dumps in the video directory. I will try again without the secure install...but for security sake, requiring an insecure installation and requiring 'root' access is a very poor practice. It also makes it next to impossible to extract the DB function into it's own tier. |
Did a fresh install again, installed as root, left mysql alone, etc...exactly like your directions. I am still getting the install error it is not making the video directory... Sorry!Error performing query ' CREATE TABLE IF NOT EXISTS |
Looks like the problem is the MySQL/MariaDB version |
Thank you Daniel, I did some research and found that this is in fact a problem with MariaDB 10.1...the best fix for Debian 9 users which installs version 10.1 is to manually install 10.2. I did that on a fresh install of Debian 9.3, added the Maria DB repository, installed, the continued on with your original config minus the 'mysql-server' and 'mysql-client' files. Also I did not install as 'root', but created the DB manually. It works like a CHAMP!!!! Wow!!! I am super impressed with what you have done and you should be quite proud of your accomplishment. Next step is to separate the encoder and DB and build as a multi-tier application. For anyone wanting to follow, the Debian 9.3 build is...
apt-get install software-properties-common dirmngr apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.osuosl.org/pub/mariadb/repo/10.2/debian stretch main' apt-get update apt-get install mariadb-server
mysql_secure_installation
mysql -u root -p
CREATE DATABASE youPHPTube;
CREATE DATABASE youPHPTubeEncoder; quit;
apt-get install curl apache2 php7.0 libapache2-mod-php7.0 php7.0-mysql \ note: should be all one line...
copy below and start pastingmkdir /var/www/html/YouPHPTube/videos mkdir /var/www/html/YouPHPTube-Encoder/videos chown -R www-data:www-data /var/www/html/YouPHPTube/ chmod 755 /var/www/html/YouPHPTube/videos chown -R www-data:www-data /var/www/html/YouPHPTube-Encoder/ chmod 755 /var/www/html/YouPHPTube-Encoder/videos cat /etc/php/7.0/apache2/php.ini | grep post_max_size sed -i -e 's/post_max_size = 8M/post_max_size = 1000M/g' /etc/php/7.0/apache2/php.ini cat /etc/php/7.0/apache2/php.ini | grep post_max_size cat /etc/php/7.0/apache2/php.ini | grep upload_max_filesize sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 1000M/g' /etc/php/7.0/apache2/php.ini cat /etc/php/7.0/apache2/php.ini | grep upload_max_filesize cat /etc/php/7.0/apache2/php.ini | grep max_execution_time sed -i -e 's/max_execution_time = 30/max_execution_time = 7200/g' /etc/php/7.0/apache2/php.ini cat /etc/php/7.0/apache2/php.ini | grep max_execution_time cat /etc/php/7.0/apache2/php.ini | grep memory_limit sed -i -e 's/memory_limit = 128M/memory_limit = 512M/g' /etc/php/7.0/apache2/php.ini cat /etc/php/7.0/apache2/php.ini | grep memory_limit systemctl restart apache2End pasting
vi /etc/apache2/apache2.conf <Directory /var/www/>
systemctl restart apache2
Thanks again! |
@magicmissile72 I really apprecciate your tutorial, I am positive it will help others |
@DanielnetoDotCom can you paste it in the wiki beside the ubunut 16.04-article? i think that would be the best place for the tutorial :) |
i made this wiki-entry for it https://github.com/DanielnetoDotCom/YouPHPTube/wiki/Install-YouPHPTube-in-Debian-9.3 so i think this can be closed. thank you for this, @magicmissile72 ! |
Fresh build on Debian 9.3
CREATE DATABASE youPHPTube; CREATE USER 'youphptube'@'localhost' IDENTIFIED BY 'sanitized'; GRANT ALL PRIVILEGES ON youPHPTube.* TO youphptube@localhost; FLUSH PRIVILEGES;Followed directions and install went well. The only deviation I made from the install was i created a user account and database for both streamer and encoder rather than use the root.
CREATE DATABASE youPHPTubeEncoder;
CREATE USER 'youphptubecoder'@'localhost' IDENTIFIED BY 'sanitized';
GRANT ALL PRIVILEGES ON youPHPTubeEncoder.* TO youphptubecoder@localhost;
FLUSH PRIVILEGES;
I added both accounts on the install page and it 'appears' to have installed correctly, however several options in the streamer admin portal generate db errors. Example:
Login as admin
click "My Video's"
click "Video Chart"
generates this error:
SELECT u., v., c.iconClass, c.name as category, c.clean_name as clean_category,c.description as category_description, v.created as videoCreation, v.modified as videoModified, (SELECT count(id) FROM video_ads as va where va.videos_id = v.id) as videoAdsCount, (SELECT count(id) FROM likes as l where l.videos_id = v.id AND
like
= 1 ) as likes, (SELECT count(id) FROM likes as l where l.videos_id = v.id ANDlike
= -1 ) as dislikes FROM videos as v LEFT JOIN categories c ON categories_id = c.id LEFT JOIN users u ON v.users_id = u.id WHERE 1=1 AND v.status IN ('a','xmp4','xwebm','xmp3','xogg') having videoAdsCount = 0 AND v.users_id = '1'\nError : (1146) Table 'youPHPTube.videos' doesn't existSimilarly, clicking "Dashboard" generates this:
SELECT u., v., c.iconClass, c.name as category, c.clean_name as clean_category,c.description as category_description, v.created as videoCreation, v.modified as videoModified, (SELECT count(id) FROM video_ads as va where va.videos_id = v.id) as videoAdsCount, (SELECT count(id) FROM likes as l where l.videos_id = v.id AND
like
= 1 ) as likes, (SELECT count(id) FROM likes as l where l.videos_id = v.id ANDlike
= -1 ) as dislikes FROM videos as v LEFT JOIN categories c ON categories_id = c.id LEFT JOIN users u ON v.users_id = u.id WHERE 1=1 AND v.status IN ('a','xmp4','xwebm','xmp3','xogg') having videoAdsCount = 0 AND v.users_id = '1'\nError : (1146) Table 'youPHPTube.videos' doesn't existLooks to be the same...
The text was updated successfully, but these errors were encountered: