This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CapitalFirstName(name) { | |
name = name.split(' ')[0]; | |
return name.charAt(0).toUpperCase() + name.slice(1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo vi /etc/mysql/my.cnf // comment out bind-adress = 127.0.0.1 | |
// add the following | |
bind-address = 0.0.0.0 | |
// write and quit | |
:wq! | |
sudo service mysql restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package javacrud; | |
import java.sql.*; | |
import java.util.Random; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
public class JavaCRUD | |
{ | |
private static ResultSet data = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> use java; | |
mysql> show tables; | |
mysql> exit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -u javaUser -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql>; GRANT ALL PRIVILEGES ON java.* to javaUser@localhost identified by "oHeyJava"; | |
mysql>; GRANT ALL PRIVILEGES ON java.* TO 'javaUser'@'localhost' WITH GRANT OPTION; | |
mysql>; CREATE USER 'javaUser'@'%' IDENTIFIED BY 'oHeyJava'; | |
mysql>; GRANT ALL PRIVILEGES ON java.* TO 'javaUser'@'%' WITH GRANT OPTION; | |
mysql>; FLUSH privileges; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql>; create database java; | |
mysql>; use java; | |
mysql>; CREATE TABLE javaTable( | |
id INT NOT NULL AUTO_INCREMENT, | |
firstName VARCHAR(100) NOT NULL, | |
lastName VARCHAR(40) NOT NULL, | |
PRIMARY KEY ( id ) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -u root -p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install libmysql-java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -tunlp | grep 25 | |
service postfix stop | |
service postfix start | |
postmap /etc/postfix/virtual | |
less /var/log/mail.log |
NewerOlder