User Tools

Site Tools


emoncms_and_dietpi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
emoncms_and_dietpi [2023/04/06 08:00]
admin
emoncms_and_dietpi [2025/02/03 17:43] (current)
me
Line 1: Line 1:
-==Emoncms on a Pi2 v1.1 running diet pi==+=====Emoncms on a Pi2 v1.1 running diet pi===== 
 + 
 + 
 +[[https://dietpi.com/#downloadinfo]]
  
 "emoncms 404 Not Found: Is modrewrite configured on your system?" "emoncms 404 Not Found: Is modrewrite configured on your system?"
Line 18: Line 21:
 </file>    </file>   
          
-Then add the rewrite regular expression to the same file;+Then add the rewrite regular expression to the same file; [[https://tech.borpin.co.uk/2018/10/13/emoncms-on-dietpi/]] 
 + 
 +<file c /etc/lighttpd/lighttpd> 
 + 
 +url.rewrite-if-not-file = ( 
 +"^/emoncms/([^?]*)$" => "/emoncms/index.php?q=$1", 
 +"^/emoncms/([^?]*)\?(.*)$" => "/emoncms/index.php?q=$1&$2" 
 +
 +</file> 
 sudo service lighttpd restart . sudo service lighttpd restart .
  
-emoncms: Access denied using password(YES)+==emoncms: Access denied using password(YES)==
  
 you can resolve this by the steps following you can resolve this by the steps following
  
-    start/stop mysql by using service mysqld start/stop/restart instead of service mysql start/stop/restart+start/stop mysql by using service mysqld start/stop/restart instead of service mysql start/stop/restart 
 + 
 +make sure you have the right password for mysql user - root, if no, please reset password  
 + 
 +edit mysql config file, usually /etc/my.cny, add skip-grant-tables under [mysqld], then restart mysql, now you can go into mysql without password, then reset password by using 
 + 
 +update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost'; 
 +flush privileges; 
 + 
 +==================================== 
 +[[https://www.databasestar.com/access-denied-for-user-root-at-localhost/]] 
 + 
 +Step 1: Open the my.cnf file. This may be stored in: 
 + 
 +/etc/my.cnf 
 +/etc/mysql/my.cnf 
 + 
 +If you’re not sure where it is, search your MySQL installation folder (e.g. on Windows or Mac) for the file. 
 + 
 +If you don’t have a my.cnf file (MacOS does not include one by default). You can create one in the /etc folder if you like. 
 + 
 +Step 2: Add the word skip-grant-tables under the word [mysqld]. Your file may look like this: 
 + 
 +[mysqld] 
 +skip-grant-tables 
 + 
 +Step 3: Restart the MySQL server. 
 + 
 +Step 4: Login to the root account: 
 + 
 +mysql -u root -p 
 + 
 +Step 5: Flush the privileges, which tells the server to refresh the grant tables and apply your changes, with this command: 
 + 
 +FLUSH PRIVILEGES; 
 + 
 +Step 6: Set a new password for the account: 
 + 
 +ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_new_password'; 
 + 
 +Substitute the word your_new_password with a new secure password that you want to use for the root account. 
 + 
 +Step 7: Open the my.cnf file you opened in step 1, and remove the line about skip-grant-tables, and save the file. 
 + 
 +Step 8: Restart the MySQL server again.
  
-    make sure you have the right password for mysql user - root, if no, please reset password by following step 3, else, skip step 3+Step 9: Log in to the root account again:
  
-    edit mysql config file, usually /etc/my.cny, add skip-grant-tables under [mysqld], then restart mysql, now you can go into mysql without password, then reset password by using+mysql -u root -p
  
-        update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';+You should now be able to log in successfully with your new password and not get an error.
  
-        flush privileges;+ 
  
  
emoncms_and_dietpi.1680768004.txt.gz · Last modified: 2023/04/06 08:00 by admin