diff --git a/bnb_graph.sh b/bnb_graph.sh index 7dbc1e86c1830aa521f850e46e7adbc93338fbac..1931c4fb320362ba167951d326b619d33022c73c 100755 --- a/bnb_graph.sh +++ b/bnb_graph.sh @@ -2,14 +2,13 @@ # Database credentials DB_USER="root" -DB_PASS="" DB_NAME="crypto_tracker" # Temporary file for storing the data temp_file="bnb_temp_data.txt" # Fetch data for the last 24 hours -mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \ +mysql -u "$DB_USER" -D "$DB_NAME" -e \ "SELECT UNIX_TIMESTAMP(timestamp), price FROM bnb_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file" # Format the data for gnuplot diff --git a/btc_graph.sh b/btc_graph.sh index b1ac4399d0277d198e707672d8c6e6af91bd8987..7daf2a46560c17f346e5ee663e0a828ac31ffe88 100755 --- a/btc_graph.sh +++ b/btc_graph.sh @@ -2,14 +2,13 @@ # Database credentials DB_USER="root" -DB_PASS="" DB_NAME="crypto_tracker" # Temporary file for storing the data temp_file="temp_data.txt" # Fetch data for the last 24 hours -mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \ +mysql -u "$DB_USER" -D "$DB_NAME" -e \ "SELECT UNIX_TIMESTAMP(timestamp), price FROM btc_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file" # Format the data for gnuplot (remove the first line containing column names) diff --git a/collect_data.sh b/collect_data.sh index 299cefc93a66a1d0e4fb595c6c42379786621e84..0a517cb72372fb55551ed7daca4e08bafa028864 100755 --- a/collect_data.sh +++ b/collect_data.sh @@ -84,11 +84,10 @@ echo "Dogecoin: Price=$dogeprice, High=$dogehigh, Low=$dogelow" # Database credentials DB_USER="root" -DB_PASS="" DB_NAME="crypto_tracker" # Insert data into the database -mysql -u $DB_USER -p$DB_PASS $DB_NAME <<EOF +mysql -u $DB_USER $DB_NAME <<EOF INSERT INTO btc_prices (price, high, low) VALUES ($btcprice, $btchigh, $btclow); INSERT INTO eth_prices (price, high, low) VALUES ($ethprice, $ethhigh, $ethlow); INSERT INTO sol_prices (price, high, low) VALUES ($solprice, $solhigh, $sollow); diff --git a/doge_graph.sh b/doge_graph.sh index 163852ba6fb574eb096155872aeb59de234cf726..fe8073a06a6dd7ef7f3d5ed6968ba97965dfee62 100755 --- a/doge_graph.sh +++ b/doge_graph.sh @@ -2,14 +2,13 @@ # Database credentials DB_USER="root" -DB_PASS="" DB_NAME="crypto_tracker" # Temporary file for storing the data temp_file="doge_temp_data.txt" # Fetch data for the last 24 hours -mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \ +mysql -u "$DB_USER" -D "$DB_NAME" -e \ "SELECT UNIX_TIMESTAMP(timestamp), price FROM doge_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file" # Format the data for gnuplot diff --git a/eth_graph.sh b/eth_graph.sh index 55a56e2e11491870537ec2e0c566275801e4e787..d9893a4fa0d7ddc11f49055031771e9cce40c2f3 100755 --- a/eth_graph.sh +++ b/eth_graph.sh @@ -2,14 +2,13 @@ # Database credentials DB_USER="root" -DB_PASS="" DB_NAME="crypto_tracker" # Temporary file for storing the data temp_file="eth_temp_data.txt" # Fetch data for the last 24 hours -mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \ +mysql -u "$DB_USER" -D "$DB_NAME" -e \ "SELECT UNIX_TIMESTAMP(timestamp), price FROM eth_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file" # Format the data for gnuplot (remove the first line containing column names) diff --git a/sol_graph.sh b/sol_graph.sh index f70ad66bbd7ea55cc41bba1cd452521ff6433b74..fc9a23d072cb54a731eb1db04ac386cbc5c02852 100755 --- a/sol_graph.sh +++ b/sol_graph.sh @@ -2,14 +2,13 @@ # Database credentials DB_USER="root" -DB_PASS="" DB_NAME="crypto_tracker" # Temporary file for storing the data temp_file="sol_temp_data.txt" # Fetch data for the last 24 hours -mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \ +mysql -u "$DB_USER" -D "$DB_NAME" -e \ "SELECT UNIX_TIMESTAMP(timestamp), price FROM sol_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file" # Format the data for gnuplot